INSERT INTO `meta_process_config` (`pdc_id`, `db_type`, `ac_target`, `taskDefinitionJson`, `taskRelationJson`, `locations`, `name`, `tenantCode`, `executionType`, `description`, `globalParams`, `timeout`, `releaseState`) VALUES (126, 'POSTGRESQL', '0', '[{\"code\":16688213802592,\"name\":\"表元数据采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":0,\"dsType\":\"POSTGRESQL\",\"dataSource\":1,\"dtType\":\"MYSQL\",\"dataTarget\":2,\"sql\":\" SELECT \\r\\n    \'pg_conn\' ssys_cd,\\r\\n     null AS data_whs_name,  \\r\\n    n.nspname AS mdl_name,\\r\\n\\tnull AS tab_no,\\r\\n\\t\'TABLE\' as tab_type,\\r\\n    c.relname AS tab_eng_name,\\r\\n    d.description AS tab_cn_name,\\r\\n    c.reltuples   AS tab_rec_num,\\r\\n\\tnow() as upd_time\\r\\nFROM \\r\\n    pg_class c\\r\\nJOIN \\r\\n    pg_namespace n ON n.oid = c.relnamespace\\r\\nLEFT JOIN \\r\\n    pg_description d ON d.objoid = c.oid AND d.objsubid = 0\\r\\nWHERE \\r\\n    c.relkind = \'r\' -- \'r\' 表示普通表\\r\\nAND \\r\\n    n.nspname = \'public\'\",\"targetTable\":\"t_metadata_extract_info_tmp\",\"jobSpeedByte\":0,\"jobSpeedRecord\":1000,\"preStatements\":[\"delete from t_metadata_extract_info_tmp\"],\"postStatements\":[],\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16688213802593,\"name\":\"表字段元数据采集\",\"version\":1,\"description\":\"表字段元数据采集\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":0,\"dsType\":\"POSTGRESQL\",\"dataSource\":1,\"dtType\":\"MYSQL\",\"dataTarget\":2,\"sql\":\"SELECT \\r\\n    \'pg_conn\' ssys_cd,\\r\\n    null data_whs_name,\\r\\n\\tn.nspname AS mdl_name,\\r\\n    null AS tab_no,\\r\\n    c.relname AS tab_eng_name,\\r\\n\\ta.attnum  fld_no,\\r\\n    a.attname AS fld_eng_name,\\r\\n    d.description AS fld_cn_name,\\r\\n\\tformat_type(a.atttypid,a.atttypmod) as fld_type,\\r\\n    -- 判断是否为主键\\r\\n    CASE \\r\\n        WHEN kcu.attrelid IS NOT NULL THEN \'Y\'\\r\\n        ELSE \'N\'\\r\\n    END AS pk_flag,\\r\\n    -- 判断是否为必填（非空）\\r\\n    CASE \\r\\n        WHEN a.attnotnull THEN \'Y\'\\r\\n        ELSE \'N\'\\r\\n    END AS require_flag,\\r\\n    -- 判断是否索引\\r\\n    CASE \\r\\n        WHEN EXISTS (SELECT 1 FROM pg_index i WHERE i.indrelid = c.oid AND a.attnum = ANY(i.indkey)) THEN \'Y\'\\r\\n        ELSE \'N\'\\r\\n    END AS idx_flag,\\r\\n    now() as upd_time\\r\\nFROM \\r\\n    pg_attribute a\\r\\nJOIN \\r\\n    pg_class c ON a.attrelid = c.oid\\r\\nJOIN \\r\\n    pg_namespace n ON n.oid = c.relnamespace\\r\\nLEFT JOIN \\r\\n    pg_description d ON d.objoid = c.oid AND d.objsubid = a.attnum\\r\\nLEFT JOIN \\r\\n    -- 主键信息\\r\\n    pg_constraint cons ON cons.conrelid = c.oid AND cons.contype = \'p\'\\r\\nLEFT JOIN \\r\\n    pg_attribute kcu ON kcu.attrelid = cons.conrelid AND kcu.attnum = ANY(cons.conkey)\\r\\nWHERE \\r\\n    a.attnum > 0 -- 排除系统保留的列\\r\\nAND \\r\\n    c.relkind = \'r\' -- \'r\' 表示普通表\\r\\nAND \\r\\n    n.nspname = \'public\' -- 替换为你的模式名\\r\\nORDER BY \\r\\n    c.oid, a.attnum;\",\"targetTable\":\"t_metadata_fld_tab_extract_info_tmp\",\"jobSpeedByte\":0,\"jobSpeedRecord\":1000,\"preStatements\":[\"delete from t_metadata_fld_tab_extract_info_tmp\"],\"postStatements\":[],\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16688213802594,\"name\":\"更新版本\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"update t_metadata_extract_info_tmp\\r\\n   set ver_desc = \'TABLE_CHANGE\'\\r\\n where (ssys_cd,mdl_name,tab_eng_name) in (\\r\\nselect m1.ssys_cd,m1.mdl_name,m1.tab_eng_name\\r\\n  from \\r\\n (\\r\\nselect  m.ssys_cd\\r\\n        ,m.mdl_name\\r\\n       ,m.tab_eng_name\\r\\n       ,m.fld_no\\r\\n    ,m.fld_eng_name\\r\\n    ,m.fld_type\\r\\n    ,m.pk_flag\\r\\n    ,m.require_flag\\r\\n    ,m.idx_flag\\r\\n  from t_metadata_fld_tab_extract_info_tmp m\\r\\n  left join t_metadata_fld_tab_extract_info n\\r\\n   on m.ssys_cd       = n.ssys_cd\\r\\n  and m.mdl_name      = n.mdl_name   \\r\\n  and m.tab_eng_name  = n.tab_eng_name\\r\\n  and m.fld_no        = n.fld_no\\r\\n  and m.fld_eng_name  = n.fld_eng_name\\r\\n  and m.fld_type      = n.fld_type\\r\\n  and m.pk_flag       = n.pk_flag\\r\\n  and m.require_flag  = n.require_flag\\r\\n  and m.idx_flag      = n.idx_flag\\r\\n  where n.mdl_name is null\\r\\n\\r\\nunion ALL\\r\\nselect  m.ssys_cd\\r\\n        ,m.mdl_name\\r\\n       ,m.tab_eng_name\\r\\n       ,m.fld_no\\r\\n    ,m.fld_eng_name\\r\\n    ,m.fld_type\\r\\n    ,m.pk_flag\\r\\n    ,m.require_flag\\r\\n    ,m.idx_flag\\r\\n  from t_metadata_fld_tab_extract_info m\\r\\n  left join t_metadata_fld_tab_extract_info_tmp n\\r\\n   on m.ssys_cd       = n.ssys_cd\\r\\n  and m.mdl_name      = n.mdl_name   \\r\\n  and m.tab_eng_name  = n.tab_eng_name\\r\\n  and m.fld_no        = n.fld_no\\r\\n  and m.fld_eng_name  = n.fld_eng_name\\r\\n  and m.fld_type      = n.fld_type\\r\\n  and m.pk_flag       = n.pk_flag\\r\\n  and m.require_flag  = n.require_flag\\r\\n  and m.idx_flag      = n.idx_flag\\r\\n  where n.mdl_name is null\\r\\n    and (m.ssys_cd,m.mdl_name) in (select distinct ssys_cd,mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n) m1\\r\\ngroup by m1.ssys_cd,m1.mdl_name,m1.tab_eng_name \\r\\n) ;\\r\\n\\r\\nupdate t_metadata_extract_info_tmp\\r\\n   set ver_desc = \'NO_CHANGE\'\\r\\n where ver_desc is null;\\r\\n\\r\\n\\r\\nupdate t_metadata_extract_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver   \\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'pg_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nupdate t_metadata_fld_tab_extract_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver    \\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'pg_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_extract_info_his\\r\\n(extract_ver_num\\r\\n,ver_desc\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,tab_no\\r\\n,tab_type\\r\\n,tab_eng_name\\r\\n,tab_cn_name\\r\\n,tab_rec_num\\r\\n,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ver_desc\\r\\n  ,ssys_cd \\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no \\r\\n  ,tab_type\\r\\n  ,tab_eng_name\\r\\n  ,tab_cn_name\\r\\n  ,tab_rec_num\\r\\n  ,upd_time\\r\\n from   t_metadata_extract_info_tmp\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_fld_tab_extract_info_his\\r\\n  (extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time\\r\\n from   t_metadata_fld_tab_extract_info_tmp\\r\\n;\\r\\n\\r\\n\\r\\ndelete from t_metadata_extract_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_extract_info_tmp)\\r\\n  and ssys_cd = \'pg_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_extract_info\\r\\n(extract_ver_num\\r\\n,ver_desc\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,tab_no\\r\\n,tab_type\\r\\n,tab_eng_name\\r\\n,tab_cn_name\\r\\n,tab_rec_num\\r\\n,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ver_desc\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_type\\r\\n  ,tab_eng_name\\r\\n  ,tab_cn_name\\r\\n  ,tab_rec_num\\r\\n  ,upd_time\\r\\n from   t_metadata_extract_info_tmp\\r\\n;\\r\\n\\r\\ndelete from t_metadata_fld_tab_extract_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_extract_info_tmp)\\r\\n  and ssys_cd = \'pg_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_fld_tab_extract_info\\r\\n  (extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time\\r\\n from   t_metadata_fld_tab_extract_info_tmp\\r\\n;\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]', '[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16688213802592,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16688213802593,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16688213802592,\"preTaskVersion\":1,\"postTaskCode\":16688213802594,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16688213802593,\"preTaskVersion\":1,\"postTaskCode\":16688213802594,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}}]', '[{\"taskCode\":16688213802592,\"x\":260,\"y\":210},{\"taskCode\":16688213802593,\"x\":260,\"y\":316.12152099609375},{\"taskCode\":16688213802594,\"x\":603.6805419921875,\"y\":268.12152099609375}]', 'syq_msq_采集元数据到结果表', 'dolphinscheduler', 'PARALLEL', '', '[]', '0', 'OFFLINE');
INSERT INTO `meta_process_config` (`pdc_id`, `db_type`, `ac_target`, `taskDefinitionJson`, `taskRelationJson`, `locations`, `name`, `tenantCode`, `executionType`, `description`, `globalParams`, `timeout`, `releaseState`) VALUES (127, 'POSTGRESQL', '1', '[{\"code\":16688477124320,\"name\":\"数据血缘采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":0,\"dsType\":\"POSTGRESQL\",\"dataSource\":1,\"dtType\":\"MYSQL\",\"dataTarget\":2,\"sql\":\"SELECT\\r\\n    \'pg_conn\' AS ssys_cd,\\r\\n    NULL AS data_whs_name,  \\r\\n    n.nspname AS mdl_name,\\r\\n    p.proname AS proc_name,\\r\\n    1 AS proc_line,\\r\\n    pg_get_functiondef(p.oid) AS proc_text, \\r\\n    now() AS upd_time\\r\\nFROM\\r\\n    pg_proc p\\r\\nJOIN\\r\\n    pg_namespace n ON p.pronamespace = n.oid\\r\\nWHERE\\r\\n    n.nspname = \'public\' \\r\\n    AND p.prokind IN (\'p\') \",\"targetTable\":\"t_metadata_data_lineage_info_tmp\",\"jobSpeedByte\":51200,\"jobSpeedRecord\":500,\"preStatements\":[\"delete from t_metadata_data_lineage_info_tmp\"],\"postStatements\":[],\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16688477124321,\"name\":\"更新版本\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"update t_metadata_data_lineage_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver   \\r\\n  from t_metadata_data_lineage_info\\r\\n where ssys_cd = \'pg_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_data_lineage_info_his\\r\\n(onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time)\\r\\nselect onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time\\r\\n from   t_metadata_data_lineage_info_tmp\\r\\n;\\r\\n\\r\\ndelete from t_metadata_data_lineage_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_data_lineage_info_tmp)\\r\\n  and ssys_cd = \'pg_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_data_lineage_info\\r\\n(onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time)\\r\\nselect onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time\\r\\n from   t_metadata_data_lineage_info_tmp\\r\\n;\\r\\n\\r\\n\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16688477124322,\"name\":\"写入库表数量到日志表\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"insert into t_metadata_data_lineage_mdl_cnt_log\\r\\n(ssys_cd,mdl_name,cnt,upd_time)\\r\\nselect ssys_cd,mdl_name,count(1) as cnt,now() as upd_time\\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'pg_conn\'\\r\\n   and mdl_name in (\'public\')\\r\\n group by ssys_cd,mdl_name\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\"\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16688477124323,\"name\":\"执行血缘解析任务\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SHELL\",\"taskParams\":{\"localParams\":[],\"rawScript\":\"ssh root@172.28.146.51 \\\"/bin/bash /root/xx/hello.sh pg_conn public\\\"\",\"resourceList\":[]},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]', '[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16688477124320,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16688477124320,\"preTaskVersion\":1,\"postTaskCode\":16688477124321,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16688477124321,\"preTaskVersion\":1,\"postTaskCode\":16688477124322,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16688477124322,\"preTaskVersion\":1,\"postTaskCode\":16688477124323,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}}]', '[{\"taskCode\":16688477124320,\"x\":320,\"y\":335},{\"taskCode\":16688477124321,\"x\":687,\"y\":335},{\"taskCode\":16688477124322,\"x\":1025.6805419921875,\"y\":335},{\"taskCode\":16688477124323,\"x\":1333.5694580078125,\"y\":335}]', 'syq_msq_采集元数据到存储过程', 'dolphinscheduler', 'PARALLEL', '', '[]', '0', 'OFFLINE');
INSERT INTO `meta_process_config` (`pdc_id`, `db_type`, `ac_target`, `taskDefinitionJson`, `taskRelationJson`, `locations`, `name`, `tenantCode`, `executionType`, `description`, `globalParams`, `timeout`, `releaseState`) VALUES (128, 'DB2', '0', '[{\"code\":16699625480160,\"name\":\"表采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":1,\"json\":\"{\\r\\n  \\\"job\\\": {\\r\\n        \\\"setting\\\": {\\r\\n            \\\"speed\\\":{\\r\\n\\t\\t\\t\\t\\\"channel\\\":1\\r\\n\\t\\t\\t},\\r\\n\\t\\t\\t\\\"errorLimit\\\":{\\r\\n\\t\\t\\t\\t\\\"record\\\":0,\\r\\n\\t\\t\\t\\t\\\"percentage\\\":0\\r\\n\\t\\t\\t}\\r\\n\\t\\t},\\r\\n        \\\"content\\\": [\\r\\n            {\\\"reader\\\": {\\r\\n                \\\"name\\\": \\\"rdbmsreader\\\",\\r\\n                \\\"parameter\\\": {\\r\\n                    \\\"connection\\\": [{\\r\\n\\t\\t\\t\\t\\t\\t\\\"querySql\\\": [\\r\\n                            \\\"SELECT  \'db2_conn\' AS ssys_cd,NULL AS data_whs_name,TABSCHEMA AS mdl_name,NULL AS tab_no,\'TABLE\' tab_type,TABNAME AS tab_eng_name,REMARKS AS tab_cn_name,CARD AS tab_rec_num,CURRENT TIMESTAMP AS upd_time FROM SYSCAT.TABLES WHERE TABSCHEMA = \'MYSCHEMA\' AND TYPE IN (\'T\')\\\"\\r\\n                        ]\\r\\n                        \\\"jdbcUrl\\\": [\\\"jdbc:db2://172.28.146.65:50000/testpd\\\"],\\r\\n                        \\r\\n                    }],\\r\\n                    \\\"username\\\": \\\"db2inst1\\\",\\r\\n                    \\\"password\\\": \\\"dbPassword\\\"}\\r\\n                },\\r\\n                \\\"writer\\\": {\\r\\n                    \\\"name\\\": \\\"mysqlwriter\\\",\\r\\n                    \\\"parameter\\\": {\\r\\n                        \\\"writeMode\\\": \\\"insert\\\",\\r\\n                        \\\"username\\\": \\\"dbf\\\",\\r\\n                        \\\"password\\\": \\\"1q2w3e4r\\\",\\r\\n                        \\\"writerThreadCount\\\": 1,\\r\\n                        \\\"column\\\":[\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`ssys_cd`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`data_whs_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`mdl_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_no`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_type`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_eng_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_cn_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_rec_num`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`upd_time`\\\"\\r\\n\\t\\t\\t\\t\\t\\t],\\r\\n\\t\\t\\t\\t\\t\\t\\\"preSql\\\": [\\\"delete from t_metadata_extract_info_tmp\\\"],\\r\\n                        \\\"connection\\\": [\\r\\n                           {\\r\\n                                \\\"jdbcUrl\\\": \\\"jdbc:mysql://172.28.146.51:3306/dash_test_w?useUnicode=true&characterEncoding=utf-8\\\",\\r\\n                                \\\"table\\\": [\\r\\n                                    \\\"t_metadata_extract_info_tmp\\\"\\r\\n                                ]\\r\\n                            }\\r\\n                        ]\\r\\n                    }\\r\\n                }\\r\\n            }\\r\\n        ]\\r\\n    }\\r\\n }\\r\\n\\r\\n\",\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699625480161,\"name\":\"表字段元数据采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":1,\"json\":\"{\\r\\n  \\\"job\\\": {\\r\\n        \\\"setting\\\": {\\r\\n            \\\"speed\\\":{\\r\\n\\t\\t\\t\\t\\\"channel\\\":1\\r\\n\\t\\t\\t},\\r\\n\\t\\t\\t\\\"errorLimit\\\":{\\r\\n\\t\\t\\t\\t\\\"record\\\":0,\\r\\n\\t\\t\\t\\t\\\"percentage\\\":0\\r\\n\\t\\t\\t}\\r\\n\\t\\t},\\r\\n        \\\"content\\\": [\\r\\n            {\\\"reader\\\": {\\r\\n                \\\"name\\\": \\\"rdbmsreader\\\",\\r\\n                \\\"parameter\\\": {\\r\\n                    \\\"connection\\\": [{\\r\\n\\t\\t\\t\\t\\t\\t\\\"querySql\\\": [\\r\\n                            \\\"SELECT \'db2_conn\' AS ssys_cd, NULL AS data_whs_name, t.tabschema AS mdl_name, NULL AS tab_no, t.tabname AS tab_eng_name, c.colno AS fld_no, c.colname AS fld_eng_name, COALESCE(c.remarks, \'\') AS fld_cn_name, CASE WHEN c.typename = \'CHARACTER\' OR c.typename = \'VARCHAR\' THEN c.typename || \'(\' || c.length || \')\' WHEN c.typename = \'DECIMAL\' OR c.typename = \'NUMERIC\' THEN c.typename || \'(\' || c.length || \',\' || c.scale || \')\' ELSE c.typename END AS fld_type, CASE WHEN pk.pkcolname IS NOT NULL THEN \'Y\' ELSE \'N\' END AS pk_flag, CASE WHEN c.nulls = \'N\' THEN \'Y\' ELSE \'N\' END AS require_flag, CASE WHEN idx.idxcolname IS NOT NULL THEN \'Y\' ELSE \'N\' END AS idx_flag, CURRENT TIMESTAMP AS upd_time FROM SYSCAT.TABLES t JOIN SYSCAT.COLUMNS c ON t.tabschema = c.tabschema AND t.tabname = c.tabname LEFT JOIN (SELECT tabschema, tabname, colname AS pkcolname FROM SYSCAT.KEYCOLUSE WHERE constname IN ( SELECT constname FROM SYSCAT.TABCONST WHERE type = \'P\' )) pk ON t.tabschema = pk.tabschema AND t.tabname = pk.tabname AND c.colname = pk.pkcolname LEFT JOIN (SELECT i.tabschema, i.tabname, ic.colname AS idxcolname FROM SYSCAT.INDEXES i JOIN SYSCAT.INDEXCOLUSE ic ON i.indname = ic.indname ) idx ON t.tabschema = idx.tabschema AND t.tabname = idx.tabname AND c.colname = idx.idxcolname WHERE t.tabschema = \'MYSCHEMA\' \\tAND T.TYPE IN (\'T\')  \\\"\\r\\n                        ]\\r\\n                        \\\"jdbcUrl\\\": [\\\"jdbc:db2://172.28.146.65:50000/testpd\\\"],\\r\\n                        \\r\\n                    }],\\r\\n                    \\\"username\\\": \\\"db2inst1\\\",\\r\\n                    \\\"password\\\": \\\"dbPassword\\\"}\\r\\n                },\\r\\n                \\\"writer\\\": {\\r\\n                    \\\"name\\\": \\\"mysqlwriter\\\",\\r\\n                    \\\"parameter\\\": {\\r\\n                        \\\"writeMode\\\": \\\"insert\\\",\\r\\n                        \\\"username\\\": \\\"dbf\\\",\\r\\n                        \\\"password\\\": \\\"1q2w3e4r\\\",\\r\\n                        \\\"writerThreadCount\\\": 1,\\r\\n                        \\\"column\\\":[\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`ssys_cd`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`data_whs_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`mdl_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_no`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`tab_eng_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`fld_no`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`fld_eng_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`fld_cn_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`fld_type`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`pk_flag`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`require_flag`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`idx_flag`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`upd_time`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t],\\r\\n\\t\\t\\t\\t\\t\\t\\\"preSql\\\": [\\\"delete from t_metadata_fld_tab_extract_info_tmp\\\"],\\r\\n                        \\\"connection\\\": [\\r\\n                           {\\r\\n                                \\\"jdbcUrl\\\": \\\"jdbc:mysql://172.28.146.51:3306/dash_test_w?useUnicode=true&characterEncoding=utf-8\\\",\\r\\n                                \\\"table\\\": [\\r\\n                                    \\\"t_metadata_fld_tab_extract_info_tmp\\\"\\r\\n                                ]\\r\\n                            }\\r\\n                        ]\\r\\n                    }\\r\\n                }\\r\\n            }\\r\\n        ]\\r\\n    }\\r\\n }\\r\\n\\r\\n\",\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699625480162,\"name\":\"更新版本\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"update t_metadata_extract_info_tmp\\r\\n   set ver_desc = \'TABLE_CHANGE\'\\r\\n where (ssys_cd,mdl_name,tab_eng_name) in (\\r\\nselect m1.ssys_cd,m1.mdl_name,m1.tab_eng_name\\r\\n  from \\r\\n (\\r\\nselect  m.ssys_cd\\r\\n        ,m.mdl_name\\r\\n       ,m.tab_eng_name\\r\\n       ,m.fld_no\\r\\n    ,m.fld_eng_name\\r\\n    ,m.fld_type\\r\\n    ,m.pk_flag\\r\\n    ,m.require_flag\\r\\n    ,m.idx_flag\\r\\n  from t_metadata_fld_tab_extract_info_tmp m\\r\\n  left join t_metadata_fld_tab_extract_info n\\r\\n   on m.ssys_cd       = n.ssys_cd\\r\\n  and m.mdl_name      = n.mdl_name   \\r\\n  and m.tab_eng_name  = n.tab_eng_name\\r\\n  and m.fld_no        = n.fld_no\\r\\n  and m.fld_eng_name  = n.fld_eng_name\\r\\n  and m.fld_type      = n.fld_type\\r\\n  and m.pk_flag       = n.pk_flag\\r\\n  and m.require_flag  = n.require_flag\\r\\n  and m.idx_flag      = n.idx_flag\\r\\n  where n.mdl_name is null\\r\\n\\r\\nunion ALL\\r\\nselect  m.ssys_cd\\r\\n        ,m.mdl_name\\r\\n       ,m.tab_eng_name\\r\\n       ,m.fld_no\\r\\n    ,m.fld_eng_name\\r\\n    ,m.fld_type\\r\\n    ,m.pk_flag\\r\\n    ,m.require_flag\\r\\n    ,m.idx_flag\\r\\n  from t_metadata_fld_tab_extract_info m\\r\\n  left join t_metadata_fld_tab_extract_info_tmp n\\r\\n   on m.ssys_cd       = n.ssys_cd\\r\\n  and m.mdl_name      = n.mdl_name   \\r\\n  and m.tab_eng_name  = n.tab_eng_name\\r\\n  and m.fld_no        = n.fld_no\\r\\n  and m.fld_eng_name  = n.fld_eng_name\\r\\n  and m.fld_type      = n.fld_type\\r\\n  and m.pk_flag       = n.pk_flag\\r\\n  and m.require_flag  = n.require_flag\\r\\n  and m.idx_flag      = n.idx_flag\\r\\n  where n.mdl_name is null\\r\\n    and (m.ssys_cd,m.mdl_name) in (select distinct ssys_cd,mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n) m1\\r\\ngroup by m1.ssys_cd,m1.mdl_name,m1.tab_eng_name \\r\\n) ;\\r\\n\\r\\nupdate t_metadata_extract_info_tmp\\r\\n   set ver_desc = \'NO_CHANGE\'\\r\\n where ver_desc is null;\\r\\n\\r\\n\\r\\nupdate t_metadata_extract_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver   \\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'db2_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nupdate t_metadata_fld_tab_extract_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver    \\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'db2_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_extract_info_his\\r\\n(extract_ver_num\\r\\n,ver_desc\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,tab_no\\r\\n,tab_type\\r\\n,tab_eng_name\\r\\n,tab_cn_name\\r\\n,tab_rec_num\\r\\n,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ver_desc\\r\\n  ,ssys_cd \\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no \\r\\n  ,tab_type\\r\\n  ,tab_eng_name\\r\\n  ,tab_cn_name\\r\\n  ,tab_rec_num\\r\\n  ,upd_time\\r\\n from   t_metadata_extract_info_tmp\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_fld_tab_extract_info_his\\r\\n  (extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time\\r\\n from   t_metadata_fld_tab_extract_info_tmp\\r\\n;\\r\\n\\r\\n\\r\\ndelete from t_metadata_extract_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_extract_info_tmp)\\r\\n  and ssys_cd = \'db2_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_extract_info\\r\\n(extract_ver_num\\r\\n,ver_desc\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,tab_no\\r\\n,tab_type\\r\\n,tab_eng_name\\r\\n,tab_cn_name\\r\\n,tab_rec_num\\r\\n,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ver_desc\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_type\\r\\n  ,tab_eng_name\\r\\n  ,tab_cn_name\\r\\n  ,tab_rec_num\\r\\n  ,upd_time\\r\\n from   t_metadata_extract_info_tmp\\r\\n;\\r\\n\\r\\ndelete from t_metadata_fld_tab_extract_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_extract_info_tmp)\\r\\n  and ssys_cd = \'db2_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_fld_tab_extract_info\\r\\n  (extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time\\r\\n from   t_metadata_fld_tab_extract_info_tmp\\r\\n;\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]', '[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16699625480160,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16699625480161,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699625480160,\"preTaskVersion\":1,\"postTaskCode\":16699625480162,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699625480161,\"preTaskVersion\":1,\"postTaskCode\":16699625480162,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}}]', '[{\"taskCode\":16699625480160,\"x\":100,\"y\":110},{\"taskCode\":16699625480161,\"x\":100,\"y\":235},{\"taskCode\":16699625480162,\"x\":538.6805419921875,\"y\":182.12152099609375}]', 'syq_msq_采集元数据到结果表', 'dolphinscheduler', 'PARALLEL', '', '[]', '0', 'OFFLINE');
INSERT INTO `meta_process_config` (`pdc_id`, `db_type`, `ac_target`, `taskDefinitionJson`, `taskRelationJson`, `locations`, `name`, `tenantCode`, `executionType`, `description`, `globalParams`, `timeout`, `releaseState`) VALUES (129, 'DB2', '1', '[{\"code\":16699623866592,\"name\":\"数据血缘采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":1,\"json\":\"{\\r\\n  \\\"job\\\": {\\r\\n        \\\"setting\\\": {\\r\\n            \\\"speed\\\":{\\r\\n\\t\\t\\t\\t\\\"channel\\\":1\\r\\n\\t\\t\\t},\\r\\n\\t\\t\\t\\\"errorLimit\\\":{\\r\\n\\t\\t\\t\\t\\\"record\\\":0,\\r\\n\\t\\t\\t\\t\\\"percentage\\\":0\\r\\n\\t\\t\\t}\\r\\n\\t\\t},\\r\\n        \\\"content\\\": [\\r\\n            {\\\"reader\\\": {\\r\\n                \\\"name\\\": \\\"rdbmsreader\\\",\\r\\n                \\\"parameter\\\": {\\r\\n                    \\\"connection\\\": [{\\r\\n\\t\\t\\t\\t\\t\\t\\\"querySql\\\": [\\r\\n                            \\\"SELECT \'db2_conn\' AS ssys_cd, NULL AS data_whs_name, ROUTINESCHEMA AS mdl_name, ROUTINENAME AS proc_name, 1 AS proc_line, TEXT AS proc_text, CURRENT TIMESTAMP AS upd_time FROM SYSCAT.ROUTINES WHERE ROUTINESCHEMA = \'MYSCHEMA\' AND ROUTINETYPE IN (\'P\') \\\"\\r\\n                        ]\\r\\n                        \\\"jdbcUrl\\\": [\\\"jdbc:db2://172.28.146.65:50000/testpd\\\"],\\r\\n                        \\r\\n                    }],\\r\\n                    \\\"username\\\": \\\"db2inst1\\\",\\r\\n                    \\\"password\\\": \\\"dbPassword\\\"}\\r\\n                },\\r\\n                \\\"writer\\\": {\\r\\n                    \\\"name\\\": \\\"mysqlwriter\\\",\\r\\n                    \\\"parameter\\\": {\\r\\n                        \\\"writeMode\\\": \\\"insert\\\",\\r\\n                        \\\"username\\\": \\\"dbf\\\",\\r\\n                        \\\"password\\\": \\\"1q2w3e4r\\\",\\r\\n                        \\\"writerThreadCount\\\": 1,\\r\\n                        \\\"column\\\":[\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`ssys_cd`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`data_whs_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`mdl_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`proc_name`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`proc_line`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`proc_text`\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\\"`upd_time`\\\"\\r\\n\\t\\t\\t\\t\\t\\t],\\r\\n\\t\\t\\t\\t\\t\\t\\\"preSql\\\": [\\\"delete from t_metadata_data_lineage_info_tmp\\\"],\\r\\n                        \\\"connection\\\": [\\r\\n                           {\\r\\n                                \\\"jdbcUrl\\\": \\\"jdbc:mysql://172.28.146.51:3306/dash_test_w?useUnicode=true&characterEncoding=utf-8\\\",\\r\\n                                \\\"table\\\": [\\r\\n                                    \\\"t_metadata_data_lineage_info_tmp\\\"\\r\\n                                ]\\r\\n                            }\\r\\n                        ]\\r\\n                    }\\r\\n                }\\r\\n            }\\r\\n        ]\\r\\n    }\\r\\n }\\r\\n\\r\\n\",\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699623866593,\"name\":\"更新版本\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"update t_metadata_data_lineage_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver   \\r\\n  from t_metadata_data_lineage_info\\r\\n where ssys_cd = \'db2_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_data_lineage_info_his\\r\\n(onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time)\\r\\nselect onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time\\r\\n from   t_metadata_data_lineage_info_tmp\\r\\n;\\r\\n\\r\\ndelete from t_metadata_data_lineage_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_data_lineage_info_tmp)\\r\\n  and ssys_cd = \'db2_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_data_lineage_info\\r\\n(onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time)\\r\\nselect onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time\\r\\n from   t_metadata_data_lineage_info_tmp\\r\\n;\\r\\n\\r\\n\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699623866594,\"name\":\"写入库表数量到日志表\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"insert into t_metadata_data_lineage_mdl_cnt_log\\r\\n(ssys_cd,mdl_name,cnt,upd_time)\\r\\nselect ssys_cd,mdl_name,count(1) as cnt,now() as upd_time\\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'pg_conn\'\\r\\n   and mdl_name in (\'MYSCHEMA\')\\r\\n group by ssys_cd,mdl_name\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699623866595,\"name\":\"执行血缘解析任务\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SHELL\",\"taskParams\":{\"localParams\":[],\"rawScript\":\"ssh root@172.28.146.51 \\\"/bin/bash /root/xx/hello.sh pg_conn MYSCHEMA\\\"\",\"resourceList\":[]},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]', '[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16699623866592,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699623866592,\"preTaskVersion\":1,\"postTaskCode\":16699623866593,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699623866593,\"preTaskVersion\":1,\"postTaskCode\":16699623866594,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699623866594,\"preTaskVersion\":1,\"postTaskCode\":16699623866595,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}}]', '[{\"taskCode\":16699623866592,\"x\":320,\"y\":335},{\"taskCode\":16699623866593,\"x\":593.6805419921875,\"y\":287},{\"taskCode\":16699623866594,\"x\":823.6805419921875,\"y\":383},{\"taskCode\":16699623866595,\"x\":813.6805419921875,\"y\":586.1215209960938}]', 'syq_msq_采集元数据到存储过程', 'dolphinscheduler', 'PARALLEL', '', '[]', '0', 'OFFLINE');
INSERT INTO `meta_process_config` (`pdc_id`, `db_type`, `ac_target`, `taskDefinitionJson`, `taskRelationJson`, `locations`, `name`, `tenantCode`, `executionType`, `description`, `globalParams`, `timeout`, `releaseState`) VALUES (130, 'ORACLE', '0', '[{\"code\":16699723296864,\"name\":\"表元数据采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":0,\"dsType\":\"ORACLE\",\"dataSource\":4,\"dtType\":\"MYSQL\",\"dataTarget\":2,\"sql\":\"select \'orcl_conn\' ssys_cd,\\r\\n       null AS data_whs_name,\\r\\n\\t   a1.owner AS mdl_name,\\r\\n\\t   null AS tab_no,\\r\\n\\t   \'TABLE\' as tab_type,\\r\\n       a1.table_name AS tab_eng_name,\\r\\n       a2.comments AS tab_cn_name,\\r\\n       a1.NUM_ROWS as tab_rec_num,\\r\\n       sysdate as upd_time\\r\\n  from dba_tables a1\\r\\n  left join dba_tab_comments a2\\r\\n  on a1.table_name = a2.table_name\\r\\n  and a1.owner = a2.owner\\r\\n  where a1.owner = \'ORCL_USER\'\",\"targetTable\":\"t_metadata_extract_info_tmp\",\"jobSpeedByte\":0,\"jobSpeedRecord\":1000,\"preStatements\":[\"delete from t_metadata_extract_info_tmp\"],\"postStatements\":[],\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699723296865,\"name\":\"表字段元数据采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":0,\"dsType\":\"ORACLE\",\"dataSource\":4,\"dtType\":\"MYSQL\",\"dataTarget\":2,\"sql\":\"SELECT\\r\\n    \'orcl_conn\' AS ssys_cd,\\r\\n    null data_whs_name,\\r\\n\\tt.owner mdl_name,\\r\\n    null AS tab_no,\\r\\n    t.table_name AS tab_eng_name,\\r\\n    c.column_id  as fld_no,\\r\\n    c.column_name as fld_eng_name,\\r\\n\\tc1.comments AS fld_cn_name,\\r\\n    c.data_type || CASE WHEN c.data_precision IS NOT NULL THEN \'(\' || c.data_precision || \')\' ELSE \'\' END AS fld_type,\\r\\n    CASE \\r\\n        WHEN p.constraint_name IS NOT NULL THEN \'Y\'\\r\\n        ELSE \'N\'\\r\\n    END AS pk_flag,\\r\\n    CASE \\r\\n        WHEN c.nullable = \'N\' THEN \'Y\'\\r\\n        ELSE \'N\'\\r\\n    END AS require_flag,\\r\\n    CASE \\r\\n        WHEN EXISTS (SELECT 1 FROM dba_ind_columns uic WHERE uic.table_name = t.table_name AND uic.column_name = c.column_name) THEN \'Y\'\\r\\n        ELSE \'N\'\\r\\n    END AS idx_flag,\\r\\n    sysdate as upd_time\\r\\nFROM\\r\\n    dba_tab_columns c\\r\\nleft join DBA_COL_COMMENTS c1\\r\\non c.owner = c1.owner\\r\\nand c.table_name = c1.table_name\\r\\nand c.COLUMN_name = c1.COLUMN_name\\r\\nJOIN\\r\\n    dba_tables t ON t.table_name = c.table_name and t.owner = c.owner \\r\\nLEFT JOIN\\r\\n    dba_constraints p ON p.table_name = t.table_name and p.owner = t.owner  AND p.constraint_type = \'P\'\\r\\nLEFT JOIN\\r\\n    dba_indexes ui ON ui.table_name = t.table_name and ui.owner = t.owner AND ui.index_name IN (\\r\\n        SELECT index_name FROM dba_ind_columns nn WHERE nn.table_name = t.table_name and nn.table_owner = t.owner AND nn.column_name = c.column_name\\r\\n    )\\r\\nWHERE\\r\\n    t.owner = \'ORCL_USER\' \\r\\nORDER BY\\r\\n    t.table_name,c.column_id\",\"targetTable\":\"t_metadata_fld_tab_extract_info_tmp\",\"jobSpeedByte\":0,\"jobSpeedRecord\":1000,\"preStatements\":[\"delete from t_metadata_fld_tab_extract_info_tmp\"],\"postStatements\":[],\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699723296866,\"name\":\"更新版本\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"update t_metadata_extract_info_tmp\\r\\n   set ver_desc = \'TABLE_CHANGE\'\\r\\n where (ssys_cd,mdl_name,tab_eng_name) in (\\r\\nselect m1.ssys_cd,m1.mdl_name,m1.tab_eng_name\\r\\n  from \\r\\n (\\r\\nselect  m.ssys_cd\\r\\n        ,m.mdl_name\\r\\n       ,m.tab_eng_name\\r\\n       ,m.fld_no\\r\\n    ,m.fld_eng_name\\r\\n    ,m.fld_type\\r\\n    ,m.pk_flag\\r\\n    ,m.require_flag\\r\\n    ,m.idx_flag\\r\\n  from t_metadata_fld_tab_extract_info_tmp m\\r\\n  left join t_metadata_fld_tab_extract_info n\\r\\n   on m.ssys_cd       = n.ssys_cd\\r\\n  and m.mdl_name      = n.mdl_name   \\r\\n  and m.tab_eng_name  = n.tab_eng_name\\r\\n  and m.fld_no        = n.fld_no\\r\\n  and m.fld_eng_name  = n.fld_eng_name\\r\\n  and m.fld_type      = n.fld_type\\r\\n  and m.pk_flag       = n.pk_flag\\r\\n  and m.require_flag  = n.require_flag\\r\\n  and m.idx_flag      = n.idx_flag\\r\\n  where n.mdl_name is null\\r\\n\\r\\nunion ALL\\r\\nselect  m.ssys_cd\\r\\n        ,m.mdl_name\\r\\n       ,m.tab_eng_name\\r\\n       ,m.fld_no\\r\\n    ,m.fld_eng_name\\r\\n    ,m.fld_type\\r\\n    ,m.pk_flag\\r\\n    ,m.require_flag\\r\\n    ,m.idx_flag\\r\\n  from t_metadata_fld_tab_extract_info m\\r\\n  left join t_metadata_fld_tab_extract_info_tmp n\\r\\n   on m.ssys_cd       = n.ssys_cd\\r\\n  and m.mdl_name      = n.mdl_name   \\r\\n  and m.tab_eng_name  = n.tab_eng_name\\r\\n  and m.fld_no        = n.fld_no\\r\\n  and m.fld_eng_name  = n.fld_eng_name\\r\\n  and m.fld_type      = n.fld_type\\r\\n  and m.pk_flag       = n.pk_flag\\r\\n  and m.require_flag  = n.require_flag\\r\\n  and m.idx_flag      = n.idx_flag\\r\\n  where n.mdl_name is null\\r\\n    and (m.ssys_cd,m.mdl_name) in (select distinct ssys_cd,mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n) m1\\r\\ngroup by m1.ssys_cd,m1.mdl_name,m1.tab_eng_name \\r\\n) ;\\r\\n\\r\\nupdate t_metadata_extract_info_tmp\\r\\n   set ver_desc = \'NO_CHANGE\'\\r\\n where ver_desc is null;\\r\\n\\r\\n\\r\\nupdate t_metadata_extract_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver   \\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'orcl_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nupdate t_metadata_fld_tab_extract_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver    \\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'orcl_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_extract_info_his\\r\\n(extract_ver_num\\r\\n,ver_desc\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,tab_no\\r\\n,tab_type\\r\\n,tab_eng_name\\r\\n,tab_cn_name\\r\\n,tab_rec_num\\r\\n,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ver_desc\\r\\n  ,ssys_cd \\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no \\r\\n  ,tab_type\\r\\n  ,tab_eng_name\\r\\n  ,tab_cn_name\\r\\n  ,tab_rec_num\\r\\n  ,upd_time\\r\\n from   t_metadata_extract_info_tmp\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_fld_tab_extract_info_his\\r\\n  (extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time\\r\\n from   t_metadata_fld_tab_extract_info_tmp\\r\\n;\\r\\n\\r\\n\\r\\ndelete from t_metadata_extract_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_extract_info_tmp)\\r\\n  and ssys_cd = \'orcl_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_extract_info\\r\\n(extract_ver_num\\r\\n,ver_desc\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,tab_no\\r\\n,tab_type\\r\\n,tab_eng_name\\r\\n,tab_cn_name\\r\\n,tab_rec_num\\r\\n,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ver_desc\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_type\\r\\n  ,tab_eng_name\\r\\n  ,tab_cn_name\\r\\n  ,tab_rec_num\\r\\n  ,upd_time\\r\\n from   t_metadata_extract_info_tmp\\r\\n;\\r\\n\\r\\ndelete from t_metadata_fld_tab_extract_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_extract_info_tmp)\\r\\n  and ssys_cd = \'orcl_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_fld_tab_extract_info\\r\\n  (extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time)\\r\\nselect  extract_ver_num\\r\\n  ,ssys_cd\\r\\n  ,data_whs_name\\r\\n  ,mdl_name\\r\\n  ,tab_no\\r\\n  ,tab_eng_name\\r\\n  ,fld_no\\r\\n  ,fld_eng_name\\r\\n  ,fld_cn_name\\r\\n  ,fld_type\\r\\n  ,pk_flag\\r\\n  ,require_flag\\r\\n  ,idx_flag\\r\\n  ,upd_time\\r\\n from   t_metadata_fld_tab_extract_info_tmp\\r\\n;\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]', '[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16699723296864,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16699723296865,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699723296864,\"preTaskVersion\":1,\"postTaskCode\":16699723296866,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699723296865,\"preTaskVersion\":1,\"postTaskCode\":16699723296866,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}}]', '[{\"taskCode\":16699723296864,\"x\":250,\"y\":174},{\"taskCode\":16699723296865,\"x\":250,\"y\":312},{\"taskCode\":16699723296866,\"x\":647.6805419921875,\"y\":252.12152099609375}]', 'syq_msq_采集元数据到结果表', 'dolphinscheduler', 'PARALLEL', '', '[]', '0', 'OFFLINE');
INSERT INTO `meta_process_config` (`pdc_id`, `db_type`, `ac_target`, `taskDefinitionJson`, `taskRelationJson`, `locations`, `name`, `tenantCode`, `executionType`, `description`, `globalParams`, `timeout`, `releaseState`) VALUES (131, 'ORACLE', '1', '[{\"code\":16699841738592,\"name\":\"数据血缘采集\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"DATAX\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"customConfig\":0,\"dsType\":\"ORACLE\",\"dataSource\":4,\"dtType\":\"MYSQL\",\"dataTarget\":2,\"sql\":\"SELECT\\r\\n    \'orcl_conn\' AS ssys_cd,\\r\\n    NULL AS data_whs_name,\\r\\n    owner AS mdl_name,\\r\\n    name AS proc_name,\\r\\n    line AS proc_line,\\r\\n    text  AS proc_text,\\r\\n    SYSDATE AS upd_time\\r\\nFROM\\r\\n    dba_source\\r\\nWHERE\\r\\n    owner = \'ORCL_USER\' \\r\\n    AND type IN (\'PROCEDURE\') \\r\\nORDER BY\\r\\n    owner, name,line\",\"targetTable\":\"t_metadata_data_lineage_info_tmp\",\"jobSpeedByte\":51200,\"jobSpeedRecord\":500,\"preStatements\":[\"delete from t_metadata_data_lineage_info_tmp\"],\"postStatements\":[],\"xms\":1,\"xmx\":1},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699841738593,\"name\":\"更新版本\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"update t_metadata_data_lineage_info_tmp a1\\r\\ninner join (\\r\\nselect mdl_name\\r\\n       ,concat(\'VERSION_\',SUBSTR(MAX(extract_ver_num),9)+1) as new_ver   \\r\\n  from t_metadata_data_lineage_info\\r\\n where ssys_cd = \'orcl_conn\' \\r\\n   and mdl_name in (select distinct mdl_name from t_metadata_fld_tab_extract_info_tmp)\\r\\n group by mdl_name\\r\\n )  a2\\r\\n set a1.extract_ver_num = coalesce(a2.new_ver,\'VERSION_1\')\\r\\n where a1.mdl_name = a2.mdl_name\\r\\n;\\r\\n\\r\\n\\r\\nInsert into t_metadata_data_lineage_info_his\\r\\n(onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time)\\r\\nselect onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time\\r\\n from   t_metadata_data_lineage_info_tmp\\r\\n;\\r\\n\\r\\ndelete from t_metadata_data_lineage_info\\r\\nwhere mdl_name in (select distinct mdl_name from t_metadata_data_lineage_info_tmp)\\r\\n  and ssys_cd = \'orcl_conn\'\\r\\n;\\r\\n\\r\\nInsert into t_metadata_data_lineage_info\\r\\n(onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time)\\r\\nselect onum\\r\\n,extract_ver_num\\r\\n,ssys_cd\\r\\n,data_whs_name\\r\\n,mdl_name\\r\\n,proc_name\\r\\n,proc_line\\r\\n,proc_text\\r\\n,upd_time\\r\\n from   t_metadata_data_lineage_info_tmp\\r\\n;\\r\\n\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699841738594,\"name\":\"写入库表数量到日志表\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SQL\",\"taskParams\":{\"localParams\":[],\"resourceList\":[],\"type\":\"MYSQL\",\"datasource\":2,\"sql\":\"insert into t_metadata_data_lineage_mdl_cnt_log\\r\\n(ssys_cd,mdl_name,cnt,upd_time)\\r\\nselect ssys_cd,mdl_name,count(1) as cnt,now() as upd_time\\r\\n  from t_metadata_extract_info\\r\\n where ssys_cd = \'orcl_conn\'\\r\\n   and mdl_name in (\'ORCL_USER\')\\r\\n group by ssys_cd,mdl_name\",\"sqlType\":\"1\",\"preStatements\":[],\"postStatements\":[],\"segmentSeparator\":\";\",\"displayRows\":10},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"},{\"code\":16699841738595,\"name\":\"执行血缘解析任务\",\"version\":1,\"description\":\"\",\"projectCode\":15094503753824,\"userId\":1,\"taskType\":\"SHELL\",\"taskParams\":{\"localParams\":[],\"rawScript\":\"ssh root@172.28.146.51 \\\"/bin/bash /root/xx/hello.sh orcl_conn ORCL_USER\\\"\",\"resourceList\":[]},\"taskParamList\":[],\"taskParamMap\":null,\"flag\":\"YES\",\"taskPriority\":\"MEDIUM\",\"userName\":null,\"projectName\":null,\"workerGroup\":\"default\",\"environmentCode\":14979658816640,\"failRetryTimes\":0,\"failRetryInterval\":1,\"timeoutFlag\":\"CLOSE\",\"timeoutNotifyStrategy\":\"WARN\",\"timeout\":0,\"delayTime\":0,\"resourceIds\":\"\"}]', '[{\"name\":\"\",\"preTaskCode\":0,\"preTaskVersion\":0,\"postTaskCode\":16699841738592,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699841738592,\"preTaskVersion\":1,\"postTaskCode\":16699841738593,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699841738593,\"preTaskVersion\":1,\"postTaskCode\":16699841738594,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}},{\"name\":\"\",\"preTaskCode\":16699841738594,\"preTaskVersion\":1,\"postTaskCode\":16699841738595,\"postTaskVersion\":1,\"conditionType\":\"NONE\",\"conditionParams\":{}}]', '[{\"taskCode\":16699841738592,\"x\":320,\"y\":342.12152099609375},{\"taskCode\":16699841738593,\"x\":677,\"y\":342.12152099609375},{\"taskCode\":16699841738594,\"x\":975.6805419921875,\"y\":342.12152099609375},{\"taskCode\":16699841738595,\"x\":1329.34716796875,\"y\":342.12152099609375}]', 'syq_msq_采集元数据到存储过程', 'dolphinscheduler', 'PARALLEL', '', '[]', '0', 'OFFLINE');
