datax-config.json 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "job": {
  3. "content": [
  4. {
  5. "reader": {
  6. "name": "mysqlreader",
  7. "parameter": {
  8. "column": [
  9. "*"
  10. ],
  11. "connection": [
  12. {
  13. "jdbcUrl": [
  14. "jdbc:mysql://localhost:3306/order?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true"
  15. ],
  16. "querySql": [
  17. "select * from test_order where updateTime >= FROM_UNIXTIME(${lastTime}) and operationDate < FROM_UNIXTIME(${currentTime})"
  18. ]
  19. }
  20. ],
  21. "password": "root",
  22. "username": "root"
  23. }
  24. },
  25. "writer": {
  26. "name": "hdfswriter",
  27. "parameter": {
  28. "defaultFS": "hdfs://localhost:9000",
  29. "fileType": "text",
  30. "path": "/user/hive/warehouse/offline.db/test_order/${partition}",
  31. "fileName": "test_order",
  32. "column": [
  33. {
  34. "name": "keyno",
  35. "type": "string"
  36. },
  37. {
  38. "name": "name",
  39. "type": "string"
  40. },
  41. {
  42. "name": "code",
  43. "type": "string"
  44. },
  45. {
  46. "name": "status",
  47. "type": "string"
  48. },
  49. {
  50. "name": "province",
  51. "type": "string"
  52. },
  53. {
  54. "name": "city",
  55. "type": "string"
  56. }
  57. ],
  58. "writeMode": "append",
  59. "fieldDelimiter": ","
  60. }
  61. }
  62. }
  63. ],
  64. "setting": {
  65. "speed": {
  66. "channel": 2
  67. }
  68. }
  69. }
  70. }