datax同步oracle数据到pg

  • Post author:
  • Post category:其他
{
	"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"]
					}]
				}
			}
		}]
	}
}

 


版权声明:本文为zuochang_liu原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。