mirror of
https://github.com/WeiYe-Jing/datax-web.git
synced 2026-07-03 21:08:58 +08:00
change:
1.修改readme
This commit is contained in:
parent
601b048245
commit
c4ed5595c1
@ -2,7 +2,7 @@
|
||||
"job": {
|
||||
"setting": {
|
||||
"speed": {
|
||||
"channel": 5
|
||||
"channel": 16
|
||||
}
|
||||
},
|
||||
"content": [
|
||||
@ -10,6 +10,7 @@
|
||||
"reader": {
|
||||
"name": "oraclereader",
|
||||
"parameter": {
|
||||
"splitPk": "user_id",
|
||||
"username": "yibo",
|
||||
"password": "yibo123",
|
||||
"column": [
|
||||
@ -19,7 +20,7 @@
|
||||
"connection": [
|
||||
{
|
||||
"table": [
|
||||
"TB_CIS_OP_FEE_DETAIL"
|
||||
"yibo.YIBO_SYS_USER"
|
||||
],
|
||||
"jdbcUrl": [
|
||||
"jdbc:oracle:thin:@192.168.1.120:1521:xe"
|
||||
@ -40,11 +41,12 @@
|
||||
"session": [
|
||||
"set session sql_mode='ANSI'"
|
||||
],
|
||||
"batchSize": "4096",
|
||||
"connection": [
|
||||
{
|
||||
"jdbcUrl": "jdbc:mysql://192.168.1.120:3306/yibo?useUnicode=true&characterEncoding=gbk",
|
||||
"table": [
|
||||
"TB_CIS_OP_FEE_DETAIL"
|
||||
"yibo.YIBO_SYS_USER"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
77
动态参数完成增量抽取.md
Normal file
77
动态参数完成增量抽取.md
Normal file
@ -0,0 +1,77 @@
|
||||
# 根据创建日期进行增量抽取
|
||||
|
||||
## datax作业配置文件
|
||||
|
||||
datax.json
|
||||
|
||||
```json
|
||||
{
|
||||
"job": {
|
||||
"setting": {
|
||||
"speed": {
|
||||
"channel": 16
|
||||
}
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"reader": {
|
||||
"name": "oraclereader",
|
||||
"parameter": {
|
||||
"splitPk": "id",
|
||||
"username": "yibo",
|
||||
"password": "yibo123",
|
||||
"column": [
|
||||
"*"
|
||||
|
||||
],
|
||||
"connection": [
|
||||
{
|
||||
|
||||
"jdbcUrl": [
|
||||
"jdbc:oracle:thin:@10.91.1.5:1521:gzfy"
|
||||
],
|
||||
"querySql": [
|
||||
"select * from tb_lis_indicators where trunc(create_date) > to_date(${createdate}, 'yyyy/mm/dd') "
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"writer": {
|
||||
"name": "mysqlwriter",
|
||||
"parameter": {
|
||||
|
||||
"username": "root",
|
||||
"password": "123456",
|
||||
"column": [
|
||||
"*"
|
||||
],
|
||||
"batchSize": "4096",
|
||||
"connection": [
|
||||
{
|
||||
"jdbcUrl": "jdbc:mysql://10.91.1.4:3306/yibo",
|
||||
"table": [
|
||||
"TB_LIS_INDICATORS"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
其中${createdate}即可以替换的变量。
|
||||
|
||||
|
||||
|
||||
## Datax启动命令
|
||||
|
||||
由于作业配置中存在变量,固需在启动任务时填充该变量
|
||||
|
||||
```shell
|
||||
python datax.py -p "-Dcreatedate='2019/03/1'" datax.json
|
||||
```
|
||||
|
||||
Loading…
Reference in New Issue
Block a user