注意,对于reader:
The following params are available for -r --reader:
[these params is for rdbms reader, used to trace rdbms read performance, it's like datax's key]
*datasourceType: datasource type, may be mysql|drds|oracle|ads|sqlserver|postgresql|db2 etc...
*jdbcUrl: datasource jdbc connection string, mysql as a example: jdbc:mysql://ip:port/database
*username: username for datasource
*password: password for datasource
*table: table name for read data
column: column to be read, the default value is ['*']
splitPk: the splitPk column of rdbms table
where: limit the scope of the performance data set
fetchSize: how many rows to be fetched at each communicate
[these params is for stream reader, used to trace rdbms write performance]
reader-sliceRecordCount: how man test data to mock(each channel), the default value is 10000
reader-column : stream reader while generate test data(type supports: string|long|date|double|bool|bytes; support constant value and random function),demo: [{"type":"string","value":"abc"},{"type":"string","random":"10,20"}]
对于writer:
The following params are available for -w --writer:
[these params is for rdbms writer, used to trace rdbms write performance, it's like datax's key]
datasourceType: datasource type, may be mysql|drds|oracle|ads|sqlserver|postgresql|db2|ads etc...
*jdbcUrl: datasource jdbc connection string, mysql as a example: jdbc:mysql://ip:port/database
*username: username for datasource
*password: password for datasource
*table: table name for write data
column: column to be writed, the default value is ['*']
batchSize: how many rows to be storeed at each communicate, the default value is 512
preSql: prepare sql to be executed before write data, the default value is ''
postSql: post sql to be executed end of write data, the default value is ''
url: required for ads, pattern is ip:port
schme: required for ads, ads database name
[these params is for stream writer, used to trace rdbms read performance]
writer-print: true means print data read from source datasource, the default value is false
对于全局配置global:
The following params are available global control:
-c --channel: the number of concurrent tasks, the default value is 1
-f --file: existing completely dataX configuration file path
-t --type: test read or write performance for a datasource, couble be reader or writer, in collaboration with -f --file
-h --help: print help message
------------------------------------------
{
"job": {
"setting": {
"speed": {
"channel": 5,
"byte": 20485760
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": [
{
"reader": {
"name": "$v_source_reader",
"parameter": {
"fetchSize": 20240,
"username": "$v_source_db_user",
"password": "$v_source_db_pwd",
"column": [
$v_source_column_name
],
"connection": [
{
"table": [
"$v_source_table_name"
],
"jdbcUrl": [
"$v_source_db_conn"
]
}
],
"batchSize": 40960,
"where": "$v_whesql"
}
},
"writer": {
"name": "$v_target_reader",
"parameter": {
"fetchSize": 20240,
"connection": [
{
"jdbcUrl": "$v_target_db_conn",
"table": [
"$v_target_table_name"
]
}
],
"username": "$v_target_db_user",
"password": "$v_target_db_pwd",
"table": "$v_target_table_name",
"column": [
$v_target_column_name
],
"batchSize": 40240,
"preSql": [
"$v_presql"
]
}
}
}
]
}
}