您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

DATAX 从scv到csv 从csv到mysql

bubuko 2022/1/25 20:09:33 mysql 字数 21459 阅读 1069 来源 http://www.bubuko.com/infolist-5-1.html

csv到csv 1 { 2 "setting": {}, 3 "job": { 4 "setting": { 5 "speed": { 6 "channel": 2 7 } 8 }, 9 "content": [ 10 { 11 "reader": { 12 "name": "txtfileread ...

csv到csv

 1 {
 2     "setting": {},
 3     "job": {
 4         "setting": {
 5             "speed": {
 6                 "channel": 2
 7             }
 8         },
 9         "content": [
10             {
11                 "reader": {
12                     "name": "txtfilereader",
13                     "parameter": {
14                         "path": ["E:/DATAX/Workplace/TEXT/csv/catalogue.csv"],
15                         "encoding": "UTF-8",
16                         "column": [
17                             {
18                                 "index": 0,
19                                 "type": "string"
20                             },
21                             {
22                                 "index": 1,
23                                 "type": "string"
24                             }
25                         ],
26                         "fieldDelimiter": ",",
27                         "skipHeader": "False"
28                     }
29                 },
30                 "writer": {
31                     "name": "txtfilewriter",
32                     "parameter": {
33                         "path": "E:/DATAX/Workplace/TEXT/csv",
34                         "fileName": "in.csv",
35                         "writeMode": "truncate",
36                         "format": "yyyy-MM-dd",
37                         "header":[id, info]
38                     }
39                 }
40             }
41         ]
42     }
43 }

从csv到mysql

 1 {
 2     "job": {
 3         "setting": {
 4             "speed": {
 5                 "channel": 2
 6             }
 7         },
 8         "content": [
 9             {
10                "reader": {
11                     "name": "txtfilereader",
12                     "parameter": {
13                         "path": ["E:/DATAX/Workplace/TEXT/csv/catalogue.csv"],
14                         "encoding": "UTF-8",
15                         "column": [
16                             {
17                                 "index": 0,
18                                 "type": "string"
19                             },
20                             {
21                                 "index": 1,
22                                 "type": "string"
23                             }
24                         ],
25                         "fieldDelimiter": ",",
26                         "skipHeader": "False"
27                     }
28                 },
29                 
30                "writer": {
31 
32                     "name": "mysqlwriter",
33 
34                     "parameter": {
35 
36                         "writeMode": "insert",
37 
38                         "username": "root",
39 
40                         "password": "zb753951",
41 
42                         "column": [
43 
44                             "name",
45 
46                             "value"
47 
48                         ],
49 
50                         "session": [],
51 
52                         "connection": [
53 
54                             {
55 
56                                 "jdbcUrl": "jdbc:mysql://127.0.0.1:3306/datax?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8",
57 
58                                 "table": ["csv1"]
59 
60                             }
61 
62                         ]
63 
64                     }
65 
66                 }
67                 
68                 
69             }
70         ]
71     }
72 }

 

DATAX 从scv到csv 从csv到mysql

原文:https://www.cnblogs.com/smartisn/p/12378250.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶