This is an automated email from the ASF dual-hosted git repository.

casion pushed a commit to branch dev-1.3.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
     new ec034b274 Update the linkis_dml.sql from 1.3.0 to 1.3.1 (#3842)
ec034b274 is described below

commit ec034b274ef7e07aa006e0b1dc3fd3c4d4f7d8ce
Author: jefftlin <[email protected]>
AuthorDate: Fri Nov 18 18:24:39 2022 +0800

    Update the linkis_dml.sql from 1.3.0 to 1.3.1 (#3842)
    
    * Update the dml of es datasource
    
    * Modify dml to make the id of linkis_ps_dm_datasource_type_key table a 
dynamic id
    
    Co-authored-by: jefftlin <[email protected]>
---
 linkis-dist/package/db/linkis_dml.sql              | 193 +++++++++++----------
 .../db/upgrade/1.3.1_schema/mysql/linkis_dml.sql   |  31 +++-
 2 files changed, 134 insertions(+), 90 deletions(-)

diff --git a/linkis-dist/package/db/linkis_dml.sql 
b/linkis-dist/package/db/linkis_dml.sql
index fd5020269..114dee947 100644
--- a/linkis-dist/package/db/linkis_dml.sql
+++ b/linkis-dist/package/db/linkis_dml.sql
@@ -462,93 +462,108 @@ INSERT INTO `linkis_ps_dm_datasource_type` (`name`, 
`description`, `option`, `cl
 INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES 
('greenplum','greenplum数据库','greenplum','关系型数据库','',3);
 INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES ('doris','doris数据库','doris','olap','',4);
 INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES 
('clickhouse','clickhouse数据库','clickhouse','olap','',4);
-
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 0, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'port', 
'端口号(Port)','Port', NULL, 'TEXT', NULL, 0, '端口号(Port)','Port', NULL, NULL, 
NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 'com.mysql.jdbc.Driver', 
'TEXT', NULL, 0, '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, 
NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 0, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 0, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (1, 'databaseName', 
'数据库名(Database name)', 'Database name', NULL, 'TEXT', NULL, 0, '数据库名(Database 
name)', 'Database name', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (4, 'envId', '集群环境(Cluster 
env)', 'Cluster env', NULL, 'SELECT', NULL, 1, '集群环境(Cluster env)', 'Cluster 
env', NULL, NULL, NULL, '/data-source-manager/env-list/all/type/4', now(), 
now());
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 
'oracle.jdbc.driver.OracleDriver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 
'Driver class name', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (6, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 0, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 'dm.jdbc.driver.DmDriver', 
'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, 
NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (7, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 'com.kingbase8.Driver', 'TEXT', 
NULL, 1, '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, NULL, 
NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (8, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'instance', NULL, NULL, NULL, NULL,  now(), now());
-
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 'org.postgresql.Driver', 
'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, 
NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (9, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 
'com.microsoft.jdbc.sqlserver.SQLServerDriver', 'TEXT', NULL, 1, '驱动类名(Driver 
class name)', 'Driver class name', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (10, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 'com.ibm.db2.jcc.DB2Driver', 
'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, 
NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (11, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 
'com.pivotal.jdbc.GreenplumDriver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 
'Driver class name', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (12, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 'com.mysql.jdbc.Driver', 
'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, 
NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (13, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'host', '主机名(Host)', 
'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'port', '端口号(Port)', 
'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, NULL, NULL, NULL,  
now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'driverClassName', 
'驱动类名(Driver class name)', 'Driver class name', 
'ru.yandex.clickhouse.ClickHouseDriver', 'TEXT', NULL, 1, '驱动类名(Driver class 
name)', 'Driver class name', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'params', 
'连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 0, 
'输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'username', 
'用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 
'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'password', 
'密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 
'Password', '', NULL, NULL, NULL,  now(), now());
-INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (14, 'instance', 
'实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 
'Instance', NULL, NULL, NULL, NULL,  now(), now());
-
-INSERT INTO `linkis_ps_dm_datasource_env` (`env_name`, `env_desc`, 
`datasource_type_id`, `parameter`, `create_time`, `create_user`, `modify_time`, 
`modify_user`) VALUES ('测试环境SIT', '测试环境SIT', 4, 
'{"uris":"thrift://localhost:9083", 
"hadoopConf":{"hive.metastore.execute.setugi":"true"}}',  now(), NULL,  now(), 
NULL);
-INSERT INTO `linkis_ps_dm_datasource_env` (`env_name`, `env_desc`, 
`datasource_type_id`, `parameter`, `create_time`, `create_user`, `modify_time`, 
`modify_user`) VALUES ('测试环境UAT', '测试环境UAT', 4, 
'{"uris":"thrift://localhost:9083", 
"hadoopConf":{"hive.metastore.execute.setugi":"true"}}',  now(), NULL,  now(), 
NULL);
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES 
('elasticsearch','elasticsearch数据源','es无结构化存储','分布式全文索引','',3);
+
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'mysql';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 0, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)','Port', NULL, 'TEXT', NULL, 0, '端口号(Port)','Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.mysql.jdbc.Driver', 'TEXT', NULL, 0, '驱动类名(Driver class name)', 'Driver 
class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 0, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 0, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'databaseName', '数据库名(Database name)', 'Database name', NULL, 'TEXT', NULL, 0, 
'数据库名(Database name)', 'Database name', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'hive';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'envId', '集群环境(Cluster env)', 'Cluster env', NULL, 'SELECT', NULL, 1, 
'集群环境(Cluster env)', 'Cluster env', NULL, NULL, NULL, 
'/data-source-manager/env-list/all/type/4', now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'oracle';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'oracle.jdbc.driver.OracleDriver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 
'Driver class name', NULL, NULL, NULL, NULL,  now(), [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 0, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'dm';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'dm.jdbc.driver.DmDriver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver 
class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'kingbase';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.kingbase8.Driver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver 
class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'postgresql';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'org.postgresql.Driver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver 
class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'sqlserver';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.microsoft.jdbc.sqlserver.SQLServerDriver', 'TEXT', NULL, 1, '驱动类名(Driver 
class name)', 'Driver class name', NULL, NULL, NULL,  [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'db2';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.ibm.db2.jcc.DB2Driver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 
'Driver class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'greenplum';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.pivotal.jdbc.GreenplumDriver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 
'Driver class name', NULL, NULL, NULL, NULL,  now() [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'doris';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.mysql.jdbc.Driver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver 
class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'clickhouse';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'ru.yandex.clickhouse.ClickHouseDriver', 'TEXT', NULL, 1, '驱动类名(Driver class 
name)', 'Driver class name', NULL, NULL, NULL, NULL,   [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'elasticsearch';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)' , 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, '', NULL, now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, '', NULL, now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'elasticUrls', 'ES连接URL(Elastic Url)', 'Elastic Url', NULL, 'TEXT', NULL, 1, 
'ES连接URL(Elastic Url)', 'Elastic Url', '', NULL, '', NULL, now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'hive';
+INSERT INTO `linkis_ps_dm_datasource_env` (`env_name`, `env_desc`, 
`datasource_type_id`, `parameter`, `create_time`, `create_user`, `modify_time`, 
`modify_user`) VALUES ('测试环境SIT', '测试环境SIT', @data_source_type_id, 
'{"uris":"thrift://localhost:9083", 
"hadoopConf":{"hive.metastore.execute.setugi":"true"}}',  now(), NULL,  now(), 
NULL);
+INSERT INTO `linkis_ps_dm_datasource_env` (`env_name`, `env_desc`, 
`datasource_type_id`, `parameter`, `create_time`, `create_user`, `modify_time`, 
`modify_user`) VALUES ('测试环境UAT', '测试环境UAT', @data_source_type_id, 
'{"uris":"thrift://localhost:9083", 
"hadoopConf":{"hive.metastore.execute.setugi":"true"}}',  now(), NULL,  now(), 
NULL);
 
diff --git a/linkis-dist/package/db/upgrade/1.3.1_schema/mysql/linkis_dml.sql 
b/linkis-dist/package/db/upgrade/1.3.1_schema/mysql/linkis_dml.sql
index 0670a9d53..662943cd2 100644
--- a/linkis-dist/package/db/upgrade/1.3.1_schema/mysql/linkis_dml.sql
+++ b/linkis-dist/package/db/upgrade/1.3.1_schema/mysql/linkis_dml.sql
@@ -19,4 +19,33 @@
 UPDATE `linkis_ps_dm_datasource_type_key` SET `require`=0 WHERE 
`data_source_type_id` = 1;
 
 -- update pipeline config key
-UPDATE `linkis_ps_configuration_config_key` SET `key` = 
'pipeline.output.isoverwrite' WHERE `key` = 'pipeline.output.isoverwtite';
\ No newline at end of file
+UPDATE `linkis_ps_configuration_config_key` SET `key` = 
'pipeline.output.isoverwrite' WHERE `key` = 'pipeline.output.isoverwtite';
+
+-- Add datasource for linkis_ps_dm_datasource_type
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES ('doris','doris数据库','doris','olap','',4);
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES 
('clickhouse','clickhouse数据库','clickhouse','olap','',4);
+INSERT INTO `linkis_ps_dm_datasource_type` (`name`, `description`, `option`, 
`classifier`, `icon`, `layers`) VALUES 
('elasticsearch','elasticsearch数据源','es无结构化存储','分布式全文索引','',3);
+
+-- Add datasource for linkis_ps_dm_datasource_type_key
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'doris';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'com.mysql.jdbc.Driver', 'TEXT', NULL, 1, '驱动类名(Driver class name)', 'Driver 
class name', NULL, NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'clickhouse';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'host', '主机名(Host)', 'Host', NULL, 'TEXT', NULL, 1, '主机名(Host)', 'Host', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'port', '端口号(Port)', 'Port', NULL, 'TEXT', NULL, 1, '端口号(Port)', 'Port', NULL, 
NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 
'ru.yandex.clickhouse.ClickHouseDriver', 'TEXT', NULL, 1, '驱动类名(Driver class 
name)', 'Driver class name', NULL, NULL, NULL, NULL,   [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, 
0, '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: 
{"param":"value"}', NULL, NULL, NULL, NULL,  no [...]
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL,  now(), 
now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, NULL, NULL,  now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, 
'实例名(instance)', 'Instance', NULL, NULL, NULL, NULL,  now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where 
`name` = 'elasticsearch';
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'username', '用户名(Username)' , 'Username', NULL, 'TEXT', NULL, 1, 
'用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, '', NULL, now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, 
'密码(Password)', 'Password', '', NULL, '', NULL, now(), now());
+INSERT INTO `linkis_ps_dm_datasource_type_key` (`data_source_type_id`, `key`, 
`name`, `name_en`, `default_value`, `value_type`, `scope`, `require`, 
`description`, `description_en`, `value_regex`, `ref_id`, `ref_value`, 
`data_source`, `update_time`, `create_time`) VALUES (@data_source_type_id, 
'elasticUrls', 'ES连接URL(Elastic Url)', 'Elastic Url', NULL, 'TEXT', NULL, 1, 
'ES连接URL(Elastic Url)', 'Elastic Url', '', NULL, '', NULL, now(), now());
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to