DataX將Oracle資料庫資料同步到達夢資料庫

杜子烟發表於2024-05-17

1.DataX3.0開源版本,rdbms裡面預設是達夢7的驅動,因此,如果像連結達夢8需要替換驅動。需要將達夢8的驅動放在D:\datax\lib、D:\datax\plugin\reader\rdbmsreader\lib和D:\datax\plugin\reader\rdbmswriter\lib下

D:\datax\plugin\reader\rdbmsreader\plugin.json和D:\datax\plugin\reader\rdbmswriter\plugin.json 確保達夢驅動名在列表中

{
    "job": {
        "setting": {
            "speed": {
                "channel": 5
            }
        },
        "content": [
            {
                "reader": {
                    "name": "oraclereader",
                    "parameter": {
                        "username": "yonghuming",
                        "password": "mima",
                        "column": [
                            "*"
                        ],
                        "connection": [
                            {
                                "table": [
                                    "table1"
                                ],
                                "jdbcUrl": [
                                    "jdbc:oracle:thin:@127.0.0.1:1521:oracledb"
                                ]
                            }
                        ]
                    }
                },
                "writer": {
                    "name": "rdbmswriter",
                    "parameter": {
                        "column": [
                            "*"
                        ],
                        "connection": [
                            {
                                "jdbcUrl": "jdbc:dm://127.0.0.1:5236?schema=dmdb", //沒有schema預設用相同使用者名稱的schema
                                "table": [
                                    "table1"
                                ]
                            }
                        ],
                        "username": "yonghuming"
                        "password": "mima"
                    }
                }
            }
        ]
    }
}

相關文章