Skip to content

Commit

Permalink
[Docs][Connector][Source][doc]add Parallel parallelism (apache#5310)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhilinli123 authored and gnehil committed Oct 12, 2023
1 parent e6c1060 commit 8c5953f
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/en/connector-v2/sink/Mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ transform {
sink {
jdbc {
url = "jdbc:mysql://localhost:3306/test"
url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
user = "root"
password = "123456"
Expand All @@ -140,7 +140,7 @@ sink {
```
sink {
jdbc {
url = "jdbc:mysql://localhost:3306/test"
url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
user = "root"
password = "123456"
Expand All @@ -159,7 +159,7 @@ sink {
```
sink {
jdbc {
url = "jdbc:mysql://localhost:3306/test"
url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
max_retries = 0
Expand All @@ -181,7 +181,7 @@ sink {
```
sink {
jdbc {
url = "jdbc:mysql://localhost:3306/test"
url = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
user = "root"
password = "123456"
Expand Down
2 changes: 1 addition & 1 deletion docs/en/connector-v2/source/Clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The following example demonstrates how to create a data synchronization job that
```bash
# Set the basic configuration of the task to be performed
env {
execution.parallelism = 1
execution.parallelism = 10
job.mode = "BATCH"
}

Expand Down
28 changes: 19 additions & 9 deletions docs/en/connector-v2/source/Jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,25 @@ Jdbc {
parallel:

```
Jdbc {
url = "jdbc:mysql://localhost/test?serverTimezone=GMT%2b8"
driver = "com.mysql.cj.jdbc.Driver"
connection_check_timeout_sec = 100
user = "root"
password = "123456"
query = "select * from type_bin"
partition_column = "id"
partition_num = 10
env {
execution.parallelism = 10
job.mode = "BATCH"
}
source {
Jdbc {
url = "jdbc:mysql://localhost/test?serverTimezone=GMT%2b8"
driver = "com.mysql.cj.jdbc.Driver"
connection_check_timeout_sec = 100
user = "root"
password = "123456"
query = "select * from type_bin"
partition_column = "id"
partition_num = 10
}
}
sink {
Console {}
}
```

Expand Down
7 changes: 7 additions & 0 deletions docs/en/connector-v2/source/MongoDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ By utilizing `flat.sync-string`, only one field attribute value can be set, and
This operation will perform a string mapping on a single MongoDB data entry.
```bash
env {
execution.parallelism = 10
job.mode = "BATCH"
}
source {
MongoDB {
uri = "mongodb://user:[email protected]:27017"
Expand All @@ -296,6 +300,9 @@ source {
}
}
}
sink {
Console {}
}
```
Use the data samples synchronized with modified parameters, such as the following:
Expand Down
13 changes: 10 additions & 3 deletions docs/en/connector-v2/source/Mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ env {
}
source{
Jdbc {
url = "jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2b8"
url = "jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
connection_check_timeout_sec = 100
user = "root"
Expand All @@ -118,9 +118,13 @@ sink {
> Read your query table in parallel with the shard field you configured and the shard data You can do this if you want to read the whole table
```
env {
execution.parallelism = 10
job.mode = "BATCH"
}
source {
Jdbc {
url = "jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2b8"
url = "jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
connection_check_timeout_sec = 100
user = "root"
Expand All @@ -133,6 +137,9 @@ source {
partition_num = 10
}
}
sink {
Console {}
}
```

### Parallel Boundary:
Expand All @@ -142,7 +149,7 @@ source {
```
source {
Jdbc {
url = "jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2b8"
url = "jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
driver = "com.mysql.cj.jdbc.Driver"
connection_check_timeout_sec = 100
user = "root"
Expand Down
7 changes: 7 additions & 0 deletions docs/en/connector-v2/source/OceanBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ sink {
> Read your query table in parallel with the shard field you configured and the shard data. You can do this if you want to read the whole table
```
env {
execution.parallelism = 10
job.mode = "BATCH"
}
source {
Jdbc {
driver = "com.oceanbase.jdbc.Driver"
Expand All @@ -141,6 +145,9 @@ source {
partition_num = 10
}
}
sink {
Console {}
}
```

### Parallel Boundary:
Expand Down
7 changes: 7 additions & 0 deletions docs/en/connector-v2/source/Oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ sink {
> Read your query table in parallel with the shard field you configured and the shard data You can do this if you want to read the whole table
```
env {
execution.parallelism = 10
job.mode = "BATCH"
}
source {
Jdbc {
url = "jdbc:oracle:thin:@datasource01:1523:xe"
Expand All @@ -126,6 +130,9 @@ source {
partition_num = 10
}
}
sink {
Console {}
}
```

### Parallel Boundary:
Expand Down
7 changes: 7 additions & 0 deletions docs/en/connector-v2/source/PostgreSQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ sink {
> Read your query table in parallel with the shard field you configured and the shard data You can do this if you want to read the whole table
```
env {
execution.parallelism = 10
job.mode = "BATCH"
}
source{
jdbc{
url = "jdbc:postgresql://localhost:5432/test"
Expand All @@ -131,6 +135,9 @@ source{
partition_num = 5
}
}
sink {
Console {}
}
```

### Parallel Boundary:
Expand Down

0 comments on commit 8c5953f

Please sign in to comment.