Datax 从Oracle导入数据到Hive
需要将oracle的数据导入到Hive上去,其实导入到hdfs和导入到hive的配置差不多。
查看集群上的文件
附上截图配置文件代码
{ "job": { "setting": { "speed": { "channel": 3, "byte": 1048576 }, "errorLimit": { "record": 0, "percentage": 0.02 } }, "content": [ { "reader": { "name": "oraclereader", "parameter": { "username": "8nm05+Fc1", "password": "ZVb8HIdO2", "splitPk": "", "connection": [ { "querySql": [ "select trade_no,RESP_MSG from vxppu.trade_detail_his" ], "jdbcUrl": [ "jdbc:oracle:thin:@//192.168.36.87:1521/uonbip" ] } ] } }, "writer": { "name": "hdfswriter", "parameter": { "defaultFS": "hdfs://192.168.61.142:9000", "fileType": "text", "path": "/hive/temp", "fileName": "tmp_trade", "writeMode": "append", "fieldDelimiter": ",", "column": [ { "name": "trade_no", "type": "string" }, { "name": "org_id", "type": "string" } ] } } } ] } }