datax sqlservr2hdfs.json模板

{
 "job": {
  "content": [
   {
    "reader": {
     "name": "sqlserverreader",
     "parameter": {
      "connection": [
       {
        "jdbcUrl": [
         "jdbc:sqlserver://ip:port;databaseName=db"
        ],
        "table": [
         "tableName"
        ]
       }
      ],
      "password": "pwd",
      "username": "sa",
      "column": [
       "*"  # *代表所有列
      ]
     }
    },
    "writer": {
     "name": "hdfswriter",
     "parameter": {
      "column": [
       {
        "name": "zwid",
        "type": "int"
       } #多個列用逗號分隔
      ],
      "compress": "",
      "defaultFS": "hdfs://ip:port",
      "fieldDelimiter": "|",
      "fileName": "filename", # 最終hdfs會添加文件後綴,比如: filename._d6b22794_fe1d_431c_b06d_564d198ea030
      "fileType": "text",
      "path": "hdfs path",
      "writeMode": "append"
     }
    }
   }
  ],
  "setting": {
   "speed": {
    "channel": "1"
   }
  }
 }
}

你可能感兴趣的:(开发工具)