mvn -U clean package assembly:assembly -Dmaven.test.skip=true
cd datax/datax/plugin/web
java -Ddatax.home=当前目录/target/datax/datax -jar skycloud-datax-web-0.0.1-SNAPSHOT.jar
或者 通过启动脚本启动
打完包后的 bin/start.sh
需要配上环境变量-Ddatax.home,此处参照上述配置mvn打包后的目录即可
{
"job": {
"setting": {
"speed": {
"channel": 3
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username": "root",
"password": "123456",
"column": [
"id",
"Name"
],
"splitPk": "id",
"connection": [
{
"table": [
"appnamespace"
],
"jdbcUrl": [
"jdbc:mysql://127.0.0.1:3306/datax_test"
]
}
]
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"writeMode": "insert",
"username": "root",
"password": "123456",
"column": [
"id",
"Name"
],
"session": [
"set session sql_mode='ANSI'"
],
"preSql": [
"delete from appnamespace"
],
"connection": [
{
"jdbcUrl": "jdbc:mysql://127.0.0.1:3306/datax_test1",
"table": [
"appnamespace"
]
}
]
}
}
}
]
}
}
https://github.com/alibaba/DataX/
- skycloud-base-config.jar 此jar包在skycloud-base项目中,配置中心(apollo) 如不使用配置中心,请删除此jar包与application.yml,并将 doc/application.properties拷贝到项目资源目录下 或者使用doc/settings.xml maven配置下载