datax oracle->pg库 迁移表

参考oracle->stream

{
    "job": {
        "setting": {
            "speed": {
            	"channel": 5
            }
        },
        "content": [
            {
                "reader": {
                    "name": "oraclereader",
                    "parameter": {
                        "username": "root",
                        "password": "root",
                        "where": "",
                        "connection": [
                            {
                                "querySql": [
                                    "select db_id,on_line_flag from db_info where db_id < 10"
                                ],
                                "jdbcUrl": [
                                    "jdbc:oracle:thin:@[HOST_NAME]:PORT:[DATABASE_NAME]"
                                ]
                            }
                        ]
                    }
                },
                "writer": {
                    "name": "streamwriter",
                    "parameter": {
                        "visible": false,
                        "encoding": "UTF-8"
                    }
                }
            }
        ]
    }
}

自定义oracle->pg

{
    "job": {
        "content": [
            {
                "reader": {
                        "name": "oraclereader",
                    "parameter": {
                        "column": [
"a",
"b",
"c"

                        ],
                        "connection": [
                            {

                                 "jdbcUrl":["jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(LOAD_BALANCE=OFF)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=billingdb)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))))"],

"querySql":["select '00' action,TO_CHAR(TO_DATE(validtime, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') validtime,TO_CHAR(TO_DATE(ELAPSETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') ELAPSETIME,TO_CHAR(TO_DATE(UPDATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') UPDATETIME from tablename"]
                            }
                        ],
                        "password": "password",
                        "username": "username"
                    }
                },
                "writer": {
                    "name": "postgresqlwriter",
                    "parameter": {
                        "column": [
"a",
"b",
"c"

                        ],
                        "connection": [
                            {
                                "jdbcUrl":"jdbc:postgresql://127.0.0.1:18921/schema",
                                "table": [
                                    "tablename"
                                ]
                            }
                        ],
                        "password": "password",
                        "username": "username"
                    }
                }
            }
        ],
        "setting": {
            "speed": {
                "channel": "6"
            }
        }
    }
}


你可能感兴趣的:(oracle,数据库)