datax oracle数据同步到oracle (异库同步传输)

由于要实现两个不同数据源的同步,datax可以高效的传输,故在做海量数据同步和迁移时,可以考虑此方法,其中json文件如下。

{
  "job": {
    "setting": {
      "speed": {
        "channel": 3,
        "byte": 1048576
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "oraclereader",
          "parameter": {
            "username": "yrH5SM8rgxfgfTYB",
            "password": "mmdfsQ8kTgfghfg",
            "splitPk": "",
            "connection": [
              {
                "querySql": [
                  "select t.ins_order_id,t.request_type,t.trad_time,t.app_time  from poqx.TRADE_ORDER_HIS t where 1=1 and t.create_time >= trunc(sysdate -1 ,'dd')  and t.create_time < trunc(sysdate ,'dd') "
                ],
                "jdbcUrl": [
                  "jdbc:oracle:thin:@192.168.81.63:1521:sxyuzs"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "oraclewriter",
          "parameter": {
            "username": "nE+PjgfgJZb+RbE",
            "password": "ariudyjdkes73A9",
            "column": [
              "\"INS_ORDER_ID\"",
              "\"REQUEST_TYPE\"",
              "\"TRAD_TIME\"",
              "\"APP_TIME\""
            ],
            "preSql": [
              "delete from i_w.TRADE_INSURANCE_ORDER_HIS t where  t.create_time >= trunc(sysdate -1 ,'dd')  and t.create_time < trunc(sysdate ,'dd')"
            ],
            "connection": [
              {
                "table": [
                  "TRADE_ORDER_HIS"
                ],
                "jdbcUrl": "jdbc:oracle:thin:@//192.168.32.10:1521/oppdb"
              }
            ]
          }
        }
      }
    ]
  }
}

 

posted @ 2021-07-05 16:26  欣欣姐  Views(1982)  Comments(0Edit  收藏  举报