You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "TaoZex (via GitHub)" <gi...@apache.org> on 2023/01/28 09:16:54 UTC

[GitHub] [incubator-seatunnel] TaoZex commented on a diff in pull request #3993: [Connector][Doc] Add sqlServer cdc connector doc

TaoZex commented on code in PR #3993:
URL: https://github.com/apache/incubator-seatunnel/pull/3993#discussion_r1089692617


##########
docs/en/connector-v2/source/SqlServer-CDC.md:
##########
@@ -0,0 +1,192 @@
+# SqlServer CDC
+
+> SqlServer CDC source connector
+
+## Description
+
+The SqlServer CDC connector allows for reading snapshot data and incremental data from SqlServer database. This document
+describes how to setup the SqlServer CDC connector to run SQL queries against SqlServer databases.
+
+## Key features
+
+- [ ] [batch](../../concept/connector-v2-features.md)
+- [x] [stream](../../concept/connector-v2-features.md)
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [column projection](../../concept/connector-v2-features.md)
+- [x] [parallelism](../../concept/connector-v2-features.md)
+- [x] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Options
+
+| name                                           | type     | required | default value |
+|------------------------------------------------|----------|----------|---------------|
+| hostname                                       | String   | Yes      | -             |
+| port                                           | Integer  | No       | 3306          |
+| username                                       | String   | Yes      | -             |
+| password                                       | String   | Yes      | -             |
+| database-name                                  | String   | Yes      | -             |
+| table-name                                     | String   | Yes      | -             |
+| startup.mode                                   | Enum     | No       | INITIAL       |
+| startup.timestamp                              | Long     | No       | -             |
+| startup.specific-offset.file                   | String   | No       | -             |
+| startup.specific-offset.pos                    | Long     | No       | -             |
+| stop.mode                                      | Enum     | No       | NEVER         |
+| stop.timestamp                                 | Long     | No       | -             |
+| stop.specific-offset.file                      | String   | No       | -             |
+| stop.specific-offset.pos                       | Long     | No       | -             |
+| incremental.parallelism                        | Integer  | No       | 1             |
+| snapshot.split.size                            | Integer  | No       | 8096          |
+| snapshot.fetch.size                            | Integer  | No       | 1024          |
+| server-time-zone                               | String   | No       | UTC           |
+| connect.timeout                                | Duration | No       | 30s           |
+| connect.max-retries                            | Integer  | No       | 3             |
+| connection.pool.size                           | Integer  | No       | 20            |
+| chunk-key.even-distribution.factor.upper-bound | Double   | No       | 1000          |
+| chunk-key.even-distribution.factor.lower-bound | Double   | No       | 0.05          |
+| debezium.*                                     | config   | No       | -             |
+| common-options                                 |          | no       | -             |
+
+### hostname [String]
+
+IP address or hostname of the database server.
+
+### port [Integer]
+
+Integer port number of the database server.
+
+### username [String]
+
+Name of the database to use when connecting to the database server.
+
+### password [String]
+
+Password to use when connecting to the database server.
+
+### database-name [String]
+
+Database name of the database to monitor.
+
+### table-name [String]
+
+Table name is a combination of schema name and table name (schemaName.tableName).
+
+
+### startup.mode [Enum]
+
+Optional startup mode for SqlServer CDC consumer, valid enumerations are "initial", "earliest", "latest" and "specific".
+
+### startup.timestamp [Long]
+
+Start from the specified epoch timestamp (in milliseconds).
+
+**Note, This option is required when the "startup.mode" option used `'timestamp'`.**
+
+### startup.specific-offset.file [String]
+
+Start from the specified binlog file name.
+
+**Note, This option is required when the "startup.mode" option used `'specific'`.**
+
+### startup.specific-offset.pos [Long]
+
+Start from the specified binlog file position.
+
+**Note, This option is required when the "startup.mode" option used `'specific'`.**
+
+### stop.mode [Enum]
+
+Optional stop mode for SqlServer CDC consumer, valid enumerations are "never".
+
+### stop.timestamp [Long]
+
+Stop from the specified epoch timestamp (in milliseconds).
+
+**Note, This option is required when the "stop.mode" option used `'timestamp'`.**
+
+### stop.specific-offset.file [String]
+
+Stop from the specified binlog file name.
+
+**Note, This option is required when the "stop.mode" option used `'specific'`.**
+
+### stop.specific-offset.pos [Long]
+
+Stop from the specified binlog file position.
+
+**Note, This option is required when the "stop.mode" option used `'specific'`.**
+
+### incremental.parallelism [Integer]
+
+The number of parallel readers in the incremental phase.
+
+### snapshot.split.size [Integer]
+
+The split size (number of rows) of table snapshot, captured tables are split into multiple splits when read the snapshot
+of table.
+
+### snapshot.fetch.size [Integer]
+
+The maximum fetch size for per poll when read table snapshot.
+
+
+### server-time-zone [String]
+
+The session time zone in database server.
+
+### connect.timeout [Duration]
+
+The maximum time that the connector should wait after trying to connect to the database server before timing out.
+
+### connect.max-retries [Integer]
+
+The max retry times that the connector should retry to build database server connection.
+
+### connection.pool.size [Integer]
+
+The connection pool size.
+
+### debezium [Config]
+
+Pass-through Debezium's properties to Debezium Embedded Engine which is used to capture data changes from SqlServer server.
+
+See more about
+the [Debezium's SqlServer Connector properties](https://debezium.io/documentation/reference/1.6/connectors/sqlserver.html#sqlserver-connector-properties)
+
+#### example
+
+```conf
+source {
+  SqlServer-CDC {
+    debezium {
+        snapshot.mode = "never"
+        decimal.handling.mode = "double"
+    }
+  }
+}
+```
+
+### common options
+
+Source plugin common parameters, please refer to [Source Common Options](common-options.md) for details.
+
+## Example
+
+```Jdbc {
+source {
+  SqlServer-CDC {
+    result_table_name = "customers"
+    hostname = "sqlserver-host"
+    port = "1433"
+    username = "sa"
+    password = "Password!"
+    database-name = "column_type_test"
+    table-name = "dbo.full_types"
+  }
+}
+```
+
+## Changelog
+
+### next version
+
+- Add SqlServer CDC Source Connector

Review Comment:
   Please add the pr link.



##########
docs/en/connector-v2/source/SqlServer-CDC.md:
##########
@@ -0,0 +1,192 @@
+# SqlServer CDC
+
+> SqlServer CDC source connector
+
+## Description
+
+The SqlServer CDC connector allows for reading snapshot data and incremental data from SqlServer database. This document
+describes how to setup the SqlServer CDC connector to run SQL queries against SqlServer databases.
+
+## Key features
+
+- [ ] [batch](../../concept/connector-v2-features.md)
+- [x] [stream](../../concept/connector-v2-features.md)
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [column projection](../../concept/connector-v2-features.md)
+- [x] [parallelism](../../concept/connector-v2-features.md)
+- [x] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Options
+
+| name                                           | type     | required | default value |
+|------------------------------------------------|----------|----------|---------------|
+| hostname                                       | String   | Yes      | -             |
+| port                                           | Integer  | No       | 3306          |
+| username                                       | String   | Yes      | -             |
+| password                                       | String   | Yes      | -             |
+| database-name                                  | String   | Yes      | -             |
+| table-name                                     | String   | Yes      | -             |
+| startup.mode                                   | Enum     | No       | INITIAL       |
+| startup.timestamp                              | Long     | No       | -             |
+| startup.specific-offset.file                   | String   | No       | -             |
+| startup.specific-offset.pos                    | Long     | No       | -             |
+| stop.mode                                      | Enum     | No       | NEVER         |
+| stop.timestamp                                 | Long     | No       | -             |
+| stop.specific-offset.file                      | String   | No       | -             |
+| stop.specific-offset.pos                       | Long     | No       | -             |
+| incremental.parallelism                        | Integer  | No       | 1             |
+| snapshot.split.size                            | Integer  | No       | 8096          |
+| snapshot.fetch.size                            | Integer  | No       | 1024          |
+| server-time-zone                               | String   | No       | UTC           |
+| connect.timeout                                | Duration | No       | 30s           |
+| connect.max-retries                            | Integer  | No       | 3             |
+| connection.pool.size                           | Integer  | No       | 20            |
+| chunk-key.even-distribution.factor.upper-bound | Double   | No       | 1000          |
+| chunk-key.even-distribution.factor.lower-bound | Double   | No       | 0.05          |
+| debezium.*                                     | config   | No       | -             |
+| common-options                                 |          | no       | -             |
+
+### hostname [String]
+
+IP address or hostname of the database server.
+
+### port [Integer]
+
+Integer port number of the database server.
+
+### username [String]
+
+Name of the database to use when connecting to the database server.
+
+### password [String]
+
+Password to use when connecting to the database server.
+
+### database-name [String]
+
+Database name of the database to monitor.
+
+### table-name [String]
+
+Table name is a combination of schema name and table name (schemaName.tableName).
+
+

Review Comment:
   It is better to delete this blank line.



##########
docs/en/connector-v2/source/SqlServer-CDC.md:
##########
@@ -0,0 +1,192 @@
+# SqlServer CDC
+
+> SqlServer CDC source connector
+
+## Description
+
+The SqlServer CDC connector allows for reading snapshot data and incremental data from SqlServer database. This document
+describes how to setup the SqlServer CDC connector to run SQL queries against SqlServer databases.
+
+## Key features
+
+- [ ] [batch](../../concept/connector-v2-features.md)
+- [x] [stream](../../concept/connector-v2-features.md)
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [column projection](../../concept/connector-v2-features.md)
+- [x] [parallelism](../../concept/connector-v2-features.md)
+- [x] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Options
+
+| name                                           | type     | required | default value |
+|------------------------------------------------|----------|----------|---------------|
+| hostname                                       | String   | Yes      | -             |
+| port                                           | Integer  | No       | 3306          |
+| username                                       | String   | Yes      | -             |
+| password                                       | String   | Yes      | -             |
+| database-name                                  | String   | Yes      | -             |
+| table-name                                     | String   | Yes      | -             |
+| startup.mode                                   | Enum     | No       | INITIAL       |
+| startup.timestamp                              | Long     | No       | -             |
+| startup.specific-offset.file                   | String   | No       | -             |
+| startup.specific-offset.pos                    | Long     | No       | -             |
+| stop.mode                                      | Enum     | No       | NEVER         |
+| stop.timestamp                                 | Long     | No       | -             |
+| stop.specific-offset.file                      | String   | No       | -             |
+| stop.specific-offset.pos                       | Long     | No       | -             |
+| incremental.parallelism                        | Integer  | No       | 1             |
+| snapshot.split.size                            | Integer  | No       | 8096          |
+| snapshot.fetch.size                            | Integer  | No       | 1024          |
+| server-time-zone                               | String   | No       | UTC           |
+| connect.timeout                                | Duration | No       | 30s           |
+| connect.max-retries                            | Integer  | No       | 3             |
+| connection.pool.size                           | Integer  | No       | 20            |
+| chunk-key.even-distribution.factor.upper-bound | Double   | No       | 1000          |
+| chunk-key.even-distribution.factor.lower-bound | Double   | No       | 0.05          |
+| debezium.*                                     | config   | No       | -             |
+| common-options                                 |          | no       | -             |
+
+### hostname [String]
+
+IP address or hostname of the database server.
+
+### port [Integer]
+
+Integer port number of the database server.
+
+### username [String]
+
+Name of the database to use when connecting to the database server.
+
+### password [String]
+
+Password to use when connecting to the database server.
+
+### database-name [String]
+
+Database name of the database to monitor.
+
+### table-name [String]
+
+Table name is a combination of schema name and table name (schemaName.tableName).
+
+
+### startup.mode [Enum]
+
+Optional startup mode for SqlServer CDC consumer, valid enumerations are "initial", "earliest", "latest" and "specific".
+
+### startup.timestamp [Long]
+
+Start from the specified epoch timestamp (in milliseconds).
+
+**Note, This option is required when the "startup.mode" option used `'timestamp'`.**
+
+### startup.specific-offset.file [String]
+
+Start from the specified binlog file name.
+
+**Note, This option is required when the "startup.mode" option used `'specific'`.**
+
+### startup.specific-offset.pos [Long]
+
+Start from the specified binlog file position.
+
+**Note, This option is required when the "startup.mode" option used `'specific'`.**
+
+### stop.mode [Enum]
+
+Optional stop mode for SqlServer CDC consumer, valid enumerations are "never".
+
+### stop.timestamp [Long]
+
+Stop from the specified epoch timestamp (in milliseconds).
+
+**Note, This option is required when the "stop.mode" option used `'timestamp'`.**
+
+### stop.specific-offset.file [String]
+
+Stop from the specified binlog file name.
+
+**Note, This option is required when the "stop.mode" option used `'specific'`.**
+
+### stop.specific-offset.pos [Long]
+
+Stop from the specified binlog file position.
+
+**Note, This option is required when the "stop.mode" option used `'specific'`.**
+
+### incremental.parallelism [Integer]
+
+The number of parallel readers in the incremental phase.
+
+### snapshot.split.size [Integer]
+
+The split size (number of rows) of table snapshot, captured tables are split into multiple splits when read the snapshot
+of table.
+
+### snapshot.fetch.size [Integer]
+
+The maximum fetch size for per poll when read table snapshot.
+
+

Review Comment:
   It is better to delete this blank line.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org