datax同步oracle数据到pg

{
	"job": {
		"setting": {
			"speed": {
				"channel": 1
			},
			"errorLimit": {
				"record": 0,
				"percentage": 0.02
			}
		},
		"content": [{
			"reader": {
				"name": "oraclereader",
				"parameter": {
					"username": "xxxxx",
					"password": "xxxxx",
					"column": [
                            "REPLACE(REPLACE(REPLACE(xxxx1,chr(9),''),chr(10),''),chr(13),'')"
                          , "REPLACE(REPLACE(REPLACE(xxxx2,chr(9),''),chr(10),''),chr(13),'')"
                          , "REPLACE(REPLACE(REPLACE(xxxx3,chr(9),''),chr(10),''),chr(13),'')"
                          , "to_char(日期1,'yyyy-MM-dd HH24:mi:ss')"
                          , "to_char(日期2,'yyyy-MM-dd HH24:mi:ss')"

					],
					"splitPk": "xxxx1",
					"connection": [{
						"table": [
							"table1"
						],
						"jdbcUrl": [
							"jdbc:oracle:thin:@192.168.x.xx:1522/test"
						]
					}]
				}
			},
			"writer": {
				"name": "postgresqlwriter",
				"parameter": {
					"username": "xxxxx",
					"password": "xxxxxxx",
					"column": [
						 "xxxx1"
                        ,"xxxx2"
                        ,"xxxx3"
                        ,"time1"
                        ,"time2"
                              ],
					"preSql": ["truncate table ods.xxxxxxxx"],
					"connection": [{
						"jdbcUrl": "jdbc:postgresql://172.xx.xx.xx:999/test",
						"table": ["ods.xxxxxxxx"]
					}]
				}
			}
		}]
	}
}
发布了79 篇原创文章 · 获赞 107 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/zuochang_liu/article/details/102834461