datax 从 txtfile 到 mysql

试一下datax 的txt—>mysql 一百多兆的文件里面大概有十几万数据 花了四分钟 慢不?

{
 "job": {
  "setting": {
   "speed": {
    "channel": 1
   }
  },
  "content": [{
   "reader": {
    "name": "txtfilereader",
    "parameter": {
     "path": ["路径"],
     "encoding": "utf-8",
     "column": [{
      "index": 1,
      "type": "string"
     }, {
      "index": 2,
      "type": "string"
     }, {
      "index": 3,
      "type": "string"
     }, {
      "index": 4,
      "type": "string"
     }, {
      "index": 5,
      "type": "string"
     }, {
      "index": 6,
      "type": "string"
     }, {
      "index": 7,
      "type": "string"
     }, {
      "index": 8,
      "type": "string"
     }, {
      "index": 9,
      "type": "string"
     }, {
      "index": 10,
      "type": "string"
     }, {
      "index": 11,
      "type": "string"
     }, {
      "index": 12,
      "type": "string"
     }],
     "fieldDelimiter": "分隔符"
    }
   },
   "writer": {
    "name": "mysqlwriter",
    "parameter": {
     "writeMode": "insert",
     "username": "username",
     "password": "password",
     "column": ["xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx", "xxx"],
     "session": [
      "set session sql_mode='ANSI'"
     ],
     "connection": [{
      "jdbcUrl": "jdbc:mysql://ip:port/dbname?useUnicode=true",
      "table": [
       "tablename"
      ]
     }]
    }
   }
  }]
 }
}

column里面的那个index根据自己的文件而定啊

你可能感兴趣的:(datax 从 txtfile 到 mysql)