datax编译以及测试流程
简单记录一下
1、编译
mvn -U clean package assembly:assembly '-Dmaven.test.skip=true'
缺少
<!-- <dependency>-->
<!-- <groupId>org.pentaho</groupId>-->
<!-- <artifactId>pentaho-aggdesigner-algorithm</artifactId>-->
<!-- <version>5.1.5-jhyde</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <!– https://mvnrepository.com/artifact/eigenbase/eigenbase-properties –>-->
<!-- <dependency>-->
<!-- <groupId>eigenbase</groupId>-->
<!-- <artifactId>eigenbase-properties</artifactId>-->
<!-- <version>1.1.4</version>-->
<!-- </dependency>-->
2、测试流程
2.1、主类
2.2 测试json
{ "job": { "content": [ { "reader": { "name": "mysqlreader", "parameter": { "connection": [ { "jdbcUrl": ["jdbc:mysql://localhost:3306/data1?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8"], "querySql":["SELECT c2.name AS countyName,c1.name AS cityName FROM county c2 LEFT JOIN city c1 ON c2.cityId = c1.id"] } ], "password": "123456", "username": "root" } }, "writer": { "name": "mysqlwriter", "parameter": { "column": [ "countyName","cityName" ], "connection": [ { "jdbcUrl": "jdbc:mysql://localhost:3306/data2?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8", "table": ["county_info"] } ], "password": "123456", "preSql": [], "session": [], "username": "root", "writeMode": "insert" } } } ], "setting": { "speed": { "channel": "10" } } } }
2.3、调试前需要先安装datax,datax.home指向的路径就是datax安装路径
3、