Skip to content

Commit

Permalink
Merge branch 'apache:dev' into improve-connector-file-base-0104
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyXin authored Jan 9, 2025
2 parents c485e61 + 55eebfa commit 9c0437a
Show file tree
Hide file tree
Showing 143 changed files with 2,564 additions and 381 deletions.
1 change: 1 addition & 0 deletions docs/en/concept/schema-evolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Schema Evolution means that the schema of a data table can be changed and the da
[StarRocks](https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/sink/StarRocks.md)
[Doris](https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/sink/Doris.md)
[Paimon](https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/sink/Paimon.md#Schema-Evolution)
[Elasticsearch](https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/sink/Elasticsearch.md#Schema-Evolution)

Note: The schema evolution is not support the transform at now. The schema evolution of different types of databases(Oracle-CDC -> Jdbc-Mysql)is currently not supported the default value of the column in ddl.

Expand Down
39 changes: 20 additions & 19 deletions docs/en/concept/schema-feature.md

Large diffs are not rendered by default.

43 changes: 37 additions & 6 deletions docs/en/connector-v2/sink/Elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,45 @@ sink {
}
```

## Changelog
### Schema Evolution

### 2.2.0-beta 2022-09-26
CDC collection supports a limited number of schema changes. The currently supported schema changes include:

- Add Elasticsearch Sink Connector
* Adding columns.

### next version
### Schema Evolution
```hocon
env {
# You can set engine configuration here
parallelism = 5
job.mode = "STREAMING"
checkpoint.interval = 5000
read_limit.bytes_per_second = 7000000
read_limit.rows_per_second = 400
}
- [Feature] Support CDC write DELETE/UPDATE/INSERT events ([3673](https://github.com/apache/seatunnel/pull/3673))
- [Feature] Support https protocol & compatible with opensearch ([3997](https://github.com/apache/seatunnel/pull/3997))
source {
MySQL-CDC {
server-id = 5652-5657
username = "st_user_source"
password = "mysqlpw"
table-names = ["shop.products"]
base-url = "jdbc:mysql://mysql_cdc_e2e:3306/shop"
schema-changes.enabled = true
}
}
sink {
Elasticsearch {
hosts = ["https://elasticsearch:9200"]
username = "elastic"
password = "elasticsearch"
tls_verify_certificate = false
tls_verify_hostname = false
index = "schema_change_index"
index_type = "_doc"
"schema_save_mode" = "CREATE_SCHEMA_WHEN_NOT_EXIST"
"data_save_mode" = "APPEND_DATA"
}
}
```
30 changes: 30 additions & 0 deletions docs/en/connector-v2/source/MySQL-CDC.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ When an initial consistent snapshot is made for large databases, your establishe
| username | String | Yes | - | Name of the database to use when connecting to the database server. |
| password | String | Yes | - | Password to use when connecting to the database server. |
| database-names | List | No | - | Database name of the database to monitor. |
| database-pattern | String | No | .* | The database names RegEx of the database to capture, for example: `database_prefix.*`. |
| table-names | List | Yes | - | Table name of the database to monitor. The table name needs to include the database name, for example: `database_name.table_name` |
| table-pattern | String | Yes | - | The table names RegEx of the database to capture. The table name needs to include the database name, for example: `database.*\\.table_.*` |
| table-names-config | List | No | - | Table config list. for example: [{"table": "db1.schema1.table1","primaryKeys": ["key1"],"snapshotSplitColumn": "key2"}] |
| startup.mode | Enum | No | INITIAL | Optional startup mode for MySQL CDC consumer, valid enumerations are `initial`, `earliest`, `latest` and `specific`. <br/> `initial`: Synchronize historical data at startup, and then synchronize incremental data.<br/> `earliest`: Startup from the earliest offset possible.<br/> `latest`: Startup from the latest offset.<br/> `specific`: Startup from user-supplied specific offsets. |
| startup.specific-offset.file | String | No | - | Start from the specified binlog file name. **Note, This option is required when the `startup.mode` option used `specific`.** |
Expand Down Expand Up @@ -303,6 +305,34 @@ sink {
}
```
### Support table-pattern for multi-table reading
> `table-pattern` and `table-names` are mutually exclusive
```hocon
env {
# You can set engine configuration here
parallelism = 1
job.mode = "STREAMING"
checkpoint.interval = 5000
read_limit.bytes_per_second=7000000
read_limit.rows_per_second=400
}
source {
MySQL-CDC {
server-id = 5652
username = "st_user_source"
password = "mysqlpw"
database-pattern = "source.*"
table-pattern = "source.*\\..*"
base-url = "jdbc:mysql://mysql_cdc_e2e:3306"
}
}
sink {
Console {
}
}
```


## Changelog
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ SeaTunnel 丰富了<a href="https://landscape.cncf.io/?item=app-definition-and-d

## 了解更多

您可以参阅[快速入门](/docs/category/start-v2/locally/deployment) 了解后续相关步骤。
您可以参阅[快速入门](start-v2/locally/deployment.md) 了解后续相关步骤。
1 change: 1 addition & 0 deletions docs/zh/concept/schema-evolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
[StarRocks](https://github.com/apache/seatunnel/blob/dev/docs/zh/connector-v2/sink/StarRocks.md)
[Doris](https://github.com/apache/seatunnel/blob/dev/docs/zh/connector-v2/sink/Doris.md)
[Paimon](https://github.com/apache/seatunnel/blob/dev/docs/zh/connector-v2/sink/Paimon.md#模式演变)
[Elasticsearch](https://github.com/apache/seatunnel/blob/dev/docs/zh/connector-v2/sink/Elasticsearch.md#模式演变)

注意: 目前模式演进不支持transform。不同类型数据库(Oracle-CDC -> Jdbc-Mysql)的模式演进目前不支持ddl中列的默认值。

Expand Down
Loading

0 comments on commit 9c0437a

Please sign in to comment.