You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "NickYoungPeng (via GitHub)" <gi...@apache.org> on 2023/05/22 08:51:17 UTC

[GitHub] [seatunnel] NickYoungPeng opened a new pull request, #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

NickYoungPeng opened a new pull request, #4803:
URL: https://github.com/apache/seatunnel/pull/4803

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update change log that in connector document. For more details you can refer to [connector-v2](https://github.com/apache/seatunnel/tree/dev/docs/en/connector-v2)
     2. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     3. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
   * [ ] Update the [`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).


-- 
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


[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288316435


##########
docs/en/connector-v2/source/Kingbase.md:
##########
@@ -0,0 +1,145 @@
+# Kingbase
+
+> JDBC Kingbase Source Connector
+

Review Comment:
   Add version information as above
   



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288435397


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.

Review Comment:
   <img width="1313" alt="image" src="https://github.com/apache/seatunnel/assets/72905543/8a8367e9-e05b-42ac-9ad8-fa96b2f9e9f8">
   i try it but not ok



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1624739480

   @hailin0 @EricJoy2048 @Hisoka-X please review


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1627028144

   > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > 
   > > 
   > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > 
   > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication.start(S
 parkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   
   <img width="1720" alt="image" src="https://github.com/apache/seatunnel/assets/72905543/a62cf1b3-4785-4a54-9db1-077fc63d3bb3">
     in local env is ok,I suspect something is wrong with the container


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288401065


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.

Review Comment:
   `com.kingbase8.util.KSQLException: ERROR: prepared transactions are disabled
     Hint: Set max_prepared_transactions to a nonzero value.`
   need Set max_prepared_transactions to a nonzero value 



-- 
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


[GitHub] [seatunnel] zhilinli123 commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1672475526

   Wait for ci


-- 
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


[GitHub] [seatunnel] hailin0 commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1558415509

   please add e2e testcase
   https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e


-- 
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


[GitHub] [seatunnel] NickYoungPeng closed pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng closed pull request #4803: [Feature][Connector-V2]  jdbc connector supports KingbaseES database
URL: https://github.com/apache/seatunnel/pull/4803


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1624542833

   > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   
   need all success?
   <img width="529" alt="Snipaste_2023-07-07_09-57-44" src="https://github.com/apache/seatunnel/assets/72905543/826d67fb-2844-470d-9796-053c51ebbb71">
   


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1556841420

   > why close?
   
   some code is not push, wait a min


-- 
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


[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288315947


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.
+
+## Supported DataSource Info
+
+| Datasource | Supported versions |        Driver        |                   Url                    |                                             Maven                                              |
+|------------|--------------------|----------------------|------------------------------------------|------------------------------------------------------------------------------------------------|
+| Kingbase   | v8r6               | com.kingbase8.Driver | jdbc:kingbase8://localhost:54321/db_test | [Download](https://repo1.maven.org/maven2/cn/com/kingbase/kingbase8/8.6.0/kingbase8-8.6.0.jar) |
+
+## Database Dependency
+
+> Please download the support list corresponding to 'Maven' and copy it to the '$SEATNUNNEL_HOME/plugins/jdbc/lib/' working directory<br/>
+> For example: cp kingbase8-8.6.0.jar $SEATNUNNEL_HOME/plugins/jdbc/lib/
+
+## Data Type Mapping
+
+|             Kingbase Data type             |                                                                SeaTunnel Data type                                                                |
+|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
+| BOOL                                       | BOOLEAN                                                                                                                                           |
+| INT2                                       | SHORT                                                                                                                                             |
+| SMALLSERIAL</br> SERIAL </br>INT4          | INT                                                                                                                                               |
+| INT8 </br>   BIGSERIAL                     | BIGINT                                                                                                                                            |
+| FLOAT4                                     | FLOAT                                                                                                                                             |
+| FLOAT8                                     | DOUBLE                                                                                                                                            |
+| NUMERIC                                    | DECIMAL((Get the designated column's specified column size),<br/>(Gets the designated column's number of digits to right of the decimal point.))) |
+| BPCHAR<br/>CHARACTER<br/> VARCHAR<br/>TEXT | STRING                                                                                                                                            |
+| TIMESTAMP                                  | LOCALDATETIME                                                                                                                                     |
+| TIME                                       | LOCALTIME                                                                                                                                         |
+| DATE                                       | LOCALDATE                                                                                                                                         |
+| Other Data type                            | Not supported yet                                                                                                                                 |
+
+## Source Options
+
+|             Name             |    Type    | Required |     Default     |                                                                                                                              Description                                                                                                                              |
+|------------------------------|------------|----------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| url                          | String     | Yes      | -               | The URL of the JDBC connection. Refer to a case: jdbc:kingbase8://localhost:54321/test                                                                                                                                                                                |
+| driver                       | String     | Yes      | -               | The jdbc class name used to connect to the remote data source, should be `com.kingbase8.Driver`.                                                                                                                                                                      |
+| user                         | String     | No       | -               | Connection instance user name                                                                                                                                                                                                                                         |
+| password                     | String     | No       | -               | Connection instance password                                                                                                                                                                                                                                          |
+| query                        | String     | Yes      | -               | Query statement                                                                                                                                                                                                                                                       |
+| connection_check_timeout_sec | Int        | No       | 30              | The time in seconds to wait for the database operation used to validate the connection to complete                                                                                                                                                                    |
+| partition_column             | String     | No       | -               | The column name for parallelism's partition, only support numeric type column and string type column.                                                                                                                                                                 |
+| partition_lower_bound        | BigDecimal | No       | -               | The partition_column min value for scan, if not set SeaTunnel will query database get min value.                                                                                                                                                                      |
+| partition_upper_bound        | BigDecimal | No       | -               | The partition_column max value for scan, if not set SeaTunnel will query database get max value.                                                                                                                                                                      |
+| partition_num                | Int        | No       | job parallelism | The number of partition count, only support positive integer. Default value is job parallelism.                                                                                                                                                                       |
+| fetch_size                   | Int        | No       | 0               | For queries that return a large number of objects, you can configure <br/> the row fetch size used in the query to improve performance by <br/> reducing the number database hits required to satisfy the selection criteria.<br/> Zero means use jdbc default value. |
+| common-options               |            | No       | -               | Source plugin common parameters, please refer to [Source Common Options](common-options.md) for details                                                                                                                                                               |
+
+### Tips
+
+> If partition_column is not set, it will run in single concurrency, and if partition_column is set, it will be executed  in parallel according to the concurrency of tasks.
+
+## Task Example
+
+### Simple:
+
+> This example defines a SeaTunnel synchronization task that automatically generates data through FakeSource and sends it to JDBC Sink. FakeSource generates a total of 16 rows of data (row.num=16), with each row having two fields, name (string type) and age (int type). The final target table is test_table will also be 16 rows of data in the table. Before run this job, you need create database test and table test_table in your DB2. And if you have not yet installed and deployed SeaTunnel, you need to follow the instructions in [Install SeaTunnel](../../start-v2/locally/deployment.md) to install and deploy SeaTunnel. And then follow the instructions in [Quick Start With SeaTunnel Engine](../../start-v2/locally/quick-start-seatunnel-engine.md) to run this job.
+
+```
+# Defining the runtime environment
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  job.mode = "BATCH"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+  FakeSource {
+    parallelism = 1
+    result_table_name = "fake"
+    row.num = 16
+    schema = {
+      fields {
+        name = "string"

Review Comment:
   Add a full type test
   



-- 
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


[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288314038


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+

Review Comment:
   reference: https://github.com/apache/seatunnel/pull/5249



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288553317


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.

Review Comment:
   don't support



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1632578050

   > > > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > > > 
   > > > > 
   > > > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > > > 
   > > > 
   > > > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication.sta
 rt(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   > > 
   > > 
   > > <img alt="image" width="1720" src="https://user-images.githubusercontent.com/72905543/251966367-a62cf1b3-4785-4a54-9db1-077fc63d3bb3.png">
   > >   in local env is ok,I suspect something is wrong with the container
   > 
   > [This link may help you to fix client encoding error](https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/)
   
   I tried the method in the link, but I couldn't resolve the issue.It seems unrelated to the Kingbase database container.I used a local Spark for testing, but the Kingbase database was still the one in the container, and it worked successfully.


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1634137905

   > ![image](https://user-images.githubusercontent.com/29588249/253173019-3a221d3e-3664-417e-b800-f45c66b65cd0.png) It can fix `ansi_x3.4-1968` error.
   
   thx sir


-- 
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


[GitHub] [seatunnel] Hisoka-X commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1201383552


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/kingbasees/KingbaseESTypeMapper.java:
##########
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.kingbasees;
+
+import org.apache.seatunnel.api.table.type.ArrayType;
+import org.apache.seatunnel.api.table.type.BasicType;
+import org.apache.seatunnel.api.table.type.DecimalType;
+import org.apache.seatunnel.api.table.type.LocalTimeType;
+import org.apache.seatunnel.api.table.type.PrimitiveByteArrayType;
+import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.common.exception.CommonErrorCode;
+import org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException;
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectTypeMapper;
+
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+
+public class KingbaseESTypeMapper implements JdbcDialectTypeMapper {
+
+    private static final String KB_SMALLSERIAL = "SMALLSERIAL";
+    private static final String KB_SERIAL = "SERIAL";
+    private static final String KB_BIGSERIAL = "BIGSERIAL";
+    private static final String KB_BYTEA = "BYTEA";
+    private static final String KB_BYTEA_ARRAY = "_BYTEA";
+    private static final String KB_SMALLINT = "INT2";
+    private static final String KB_SMALLINT_ARRAY = "_INT2";
+    private static final String KB_INTEGER = "INT4";
+    private static final String KB_INTEGER_ARRAY = "_INT4";
+    private static final String KB_BIGINT = "INT8";
+    private static final String KB_BIGINT_ARRAY = "_INT8";
+    private static final String KB_REAL = "FLOAT4";
+    private static final String KB_REAL_ARRAY = "_FLOAT4";
+    private static final String KB_DOUBLE_PRECISION = "FLOAT8";
+    private static final String KB_DOUBLE_PRECISION_ARRAY = "_FLOAT8";
+    private static final String KB_NUMERIC = "NUMERIC";
+    private static final String KB_NUMERIC_ARRAY = "_NUMERIC";
+    private static final String KB_BOOLEAN = "BOOL";
+    private static final String KB_BOOLEAN_ARRAY = "_BOOL";
+    private static final String KB_TIMESTAMP = "TIMESTAMP";
+    private static final String KB_TIMESTAMP_ARRAY = "_TIMESTAMP";
+    private static final String KB_TIMESTAMPTZ = "TIMESTAMPTZ";
+    private static final String KB_TIMESTAMPTZ_ARRAY = "_TIMESTAMPTZ";
+    private static final String KB_DATE = "DATE";
+    private static final String KB_DATE_ARRAY = "_DATE";
+    private static final String KB_TIME = "TIME";
+    private static final String KB_TIME_ARRAY = "_TIME";
+    private static final String KB_TEXT = "TEXT";
+    private static final String KB_TEXT_ARRAY = "_TEXT";
+    private static final String KB_CHAR = "BPCHAR";
+    private static final String KB_CHAR_ARRAY = "_BPCHAR";
+    private static final String KB_CHARACTER = "CHARACTER";
+    private static final String KB_CHARACTER_ARRAY = "_CHARACTER";
+    private static final String KB_CHARACTER_VARYING = "VARCHAR";
+    private static final String KB_CHARACTER_VARYING_ARRAY = "_VARCHAR";
+    private static final String KB_JSON = "JSON";
+    private static final String KB_JSONB = "JSONB";
+
+    @SuppressWarnings("checkstyle:MagicNumber")
+    @Override
+    public SeaTunnelDataType<?> mapping(ResultSetMetaData metadata, int colIndex)
+            throws SQLException {
+
+        String kbType = metadata.getColumnTypeName(colIndex).toUpperCase();
+
+        int precision = metadata.getPrecision(colIndex);
+
+        switch (kbType) {
+            case KB_BOOLEAN:
+                return BasicType.BOOLEAN_TYPE;
+            case KB_BOOLEAN_ARRAY:
+                return ArrayType.BOOLEAN_ARRAY_TYPE;
+            case KB_BYTEA:
+                return PrimitiveByteArrayType.INSTANCE;
+            case KB_BYTEA_ARRAY:
+                return ArrayType.BYTE_ARRAY_TYPE;
+            case KB_SMALLINT:

Review Comment:
   SMALLINT should map to short



-- 
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


[GitHub] [seatunnel] hailin0 commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1556828851

   why close?


-- 
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


[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288313218


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.
+
+## Supported DataSource Info
+
+| Datasource | Supported versions |        Driver        |                   Url                    |                                             Maven                                              |
+|------------|--------------------|----------------------|------------------------------------------|------------------------------------------------------------------------------------------------|
+| Kingbase   | v8r6               | com.kingbase8.Driver | jdbc:kingbase8://localhost:54321/db_test | [Download](https://repo1.maven.org/maven2/cn/com/kingbase/kingbase8/8.6.0/kingbase8-8.6.0.jar) |
+
+## Database Dependency

Review Comment:
   > Add kingbase support versions? @zhilinli123
   
   yes cc @liugddx @NickYoungPeng  https://github.com/apache/seatunnel/pull/5249



-- 
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


[GitHub] [seatunnel] NickYoungPeng closed pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng closed pull request #4803: [Feature][Connector-V2]  jdbc connector supports Kingbase database
URL: https://github.com/apache/seatunnel/pull/4803


-- 
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


[GitHub] [seatunnel] liugddx commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288303892


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.

Review Comment:
   @ic4y Does kingbase have this feature?
   
   



##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.
+
+## Supported DataSource Info
+
+| Datasource | Supported versions |        Driver        |                   Url                    |                                             Maven                                              |
+|------------|--------------------|----------------------|------------------------------------------|------------------------------------------------------------------------------------------------|
+| Kingbase   | v8r6               | com.kingbase8.Driver | jdbc:kingbase8://localhost:54321/db_test | [Download](https://repo1.maven.org/maven2/cn/com/kingbase/kingbase8/8.6.0/kingbase8-8.6.0.jar) |
+
+## Database Dependency

Review Comment:
   Add kingbase support versions? @zhilinli123 



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1682451214

   close #4758 #4512


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1632798856

   > > > > > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > > > > > 
   > > > > > > 
   > > > > > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > > > > > 
   > > > > > 
   > > > > > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication
 .start(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   > > > > 
   > > > > 
   > > > > <img alt="image" width="1720" src="https://user-images.githubusercontent.com/72905543/251966367-a62cf1b3-4785-4a54-9db1-077fc63d3bb3.png">
   > > > >   in local env is ok,I suspect something is wrong with the container
   > > > 
   > > > 
   > > > [This link may help you to fix client encoding error](https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/)
   > > 
   > > 
   > > I tried the method in the link, but I couldn't resolve the issue.It seems unrelated to the Kingbase database container.I used a local Spark for testing, but the Kingbase database was still the one in the container, and it worked successfully.
   > 
   > Yes, I have added the spark container, but it can't be solved.
   
   <img width="865" alt="image" src="https://github.com/apache/seatunnel/assets/72905543/2c577bdb-0c4e-4e97-af9c-9360d8885f06">
   


-- 
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


[GitHub] [seatunnel] CheneyYin commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "CheneyYin (via GitHub)" <gi...@apache.org>.
CheneyYin commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1633599032

   ![image](https://github.com/apache/seatunnel/assets/29588249/3a221d3e-3664-417e-b800-f45c66b65cd0)
   It can fix `ansi_x3.4-1968` error.


-- 
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


[GitHub] [seatunnel] liugddx commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1670692845

   @zhilinli123 PTAL


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1671041737

   @zhilinli123 TBR


-- 
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


[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288317234


##########
docs/en/connector-v2/source/Kingbase.md:
##########
@@ -0,0 +1,145 @@
+# Kingbase
+
+> JDBC Kingbase Source Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [stream](../../concept/connector-v2-features.md)
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [x] [column projection](../../concept/connector-v2-features.md)
+- [x] [parallelism](../../concept/connector-v2-features.md)
+- [x] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Description
+
+Read external data source data through JDBC.
+
+## Supported DataSource Info
+
+| Datasource | Supported versions |        Driver        |                   Url                    |                                             Maven                                              |
+|------------|--------------------|----------------------|------------------------------------------|------------------------------------------------------------------------------------------------|
+| Kingbase   | v8r6               | com.kingbase8.Driver | jdbc:kingbase8://localhost:54321/db_test | [Download](https://repo1.maven.org/maven2/cn/com/kingbase/kingbase8/8.6.0/kingbase8-8.6.0.jar) |
+
+## Database Dependency
+
+> Please download the support list corresponding to 'Maven' and copy it to the '$SEATNUNNEL_HOME/plugins/jdbc/lib/' working directory<br/>
+> For example: cp kingbase8-8.6.0.jar $SEATNUNNEL_HOME/plugins/jdbc/lib/
+
+## Data Type Mapping
+
+|             Kingbase Data type             |                                                                SeaTunnel Data type                                                                |
+|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
+| BOOL                                       | BOOLEAN                                                                                                                                           |
+| INT2                                       | SHORT                                                                                                                                             |
+| SMALLSERIAL</br> SERIAL </br>INT4          | INT                                                                                                                                               |
+| INT8 </br>   BIGSERIAL                     | BIGINT                                                                                                                                            |
+| FLOAT4                                     | FLOAT                                                                                                                                             |
+| FLOAT8                                     | DOUBLE                                                                                                                                            |
+| NUMERIC                                    | DECIMAL((Get the designated column's specified column size),<br/>(Gets the designated column's number of digits to right of the decimal point.))) |
+| BPCHAR<br/>CHARACTER<br/> VARCHAR<br/>TEXT | STRING                                                                                                                                            |
+| TIMESTAMP                                  | LOCALDATETIME                                                                                                                                     |
+| TIME                                       | LOCALTIME                                                                                                                                         |
+| DATE                                       | LOCALDATE                                                                                                                                         |
+| Other Data type                            | Not supported yet                                                                                                                                 |
+
+## Source Options
+
+|             Name             |    Type    | Required |     Default     |                                                                                                                              Description                                                                                                                              |
+|------------------------------|------------|----------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| url                          | String     | Yes      | -               | The URL of the JDBC connection. Refer to a case: jdbc:kingbase8://localhost:54321/test                                                                                                                                                                                |
+| driver                       | String     | Yes      | -               | The jdbc class name used to connect to the remote data source, should be `com.kingbase8.Driver`.                                                                                                                                                                      |
+| user                         | String     | No       | -               | Connection instance user name                                                                                                                                                                                                                                         |
+| password                     | String     | No       | -               | Connection instance password                                                                                                                                                                                                                                          |
+| query                        | String     | Yes      | -               | Query statement                                                                                                                                                                                                                                                       |
+| connection_check_timeout_sec | Int        | No       | 30              | The time in seconds to wait for the database operation used to validate the connection to complete                                                                                                                                                                    |
+| partition_column             | String     | No       | -               | The column name for parallelism's partition, only support numeric type column and string type column.                                                                                                                                                                 |
+| partition_lower_bound        | BigDecimal | No       | -               | The partition_column min value for scan, if not set SeaTunnel will query database get min value.                                                                                                                                                                      |
+| partition_upper_bound        | BigDecimal | No       | -               | The partition_column max value for scan, if not set SeaTunnel will query database get max value.                                                                                                                                                                      |
+| partition_num                | Int        | No       | job parallelism | The number of partition count, only support positive integer. Default value is job parallelism.                                                                                                                                                                       |
+| fetch_size                   | Int        | No       | 0               | For queries that return a large number of objects, you can configure <br/> the row fetch size used in the query to improve performance by <br/> reducing the number database hits required to satisfy the selection criteria.<br/> Zero means use jdbc default value. |
+| common-options               |            | No       | -               | Source plugin common parameters, please refer to [Source Common Options](common-options.md) for details                                                                                                                                                               |
+
+### Tips
+
+> If partition_column is not set, it will run in single concurrency, and if partition_column is set, it will be executed  in parallel according to the concurrency of tasks.
+
+## Task Example
+
+### Simple:
+
+```
+env {
+  execution.parallelism = 2
+  job.mode = "BATCH"
+}
+
+source {
+  Jdbc {
+    driver = "com.kingbase8.Driver"
+    url = "jdbc:kingbase8://localhost:54321/db_test"
+    user = "root"
+    password = ""
+    query = "select * from source"
+  }
+}
+
+transform {
+    # If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
+    # please go to https://seatunnel.apache.org/docs/transform/sql
+}
+
+sink {
+    Console {}
+}
+```
+
+### Parallel:
+
+> 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
+
+```
+source {
+  Jdbc {
+    driver = "com.kingbase8.Driver"
+    url = "jdbc:kingbase8://localhost:54321/db_test"
+    user = "root"
+    password = ""
+    query = "select * from source"
+    # Parallel sharding reads fields
+    partition_column = "id"
+    # Number of fragments
+    partition_num = 10
+  }
+}
+```
+
+### Parallel Boundary:
+
+> It is more efficient to read your data source according to the upper and lower boundaries you configured
+
+```
+source {
+  Jdbc {
+    driver = "com.kingbase8.Driver"
+    url = "jdbc:kingbase8://localhost:54321/db_test"
+    user = "root"
+    password = ""
+    compatible_mode = "mysql"

Review Comment:
   mykingbase?



-- 
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


[GitHub] [seatunnel] CheneyYin commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "CheneyYin (via GitHub)" <gi...@apache.org>.
CheneyYin commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1630691160

   > > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > > 
   > > > 
   > > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > > 
   > > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication.start
 (SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   > 
   > <img width="1720" alt="image" src="https://github.com/apache/seatunnel/assets/72905543/a62cf1b3-4785-4a54-9db1-077fc63d3bb3">
   >   in local env is ok,I suspect something is wrong with the container
   
   [This link may help you to fix client encoding error](https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/)


-- 
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


[GitHub] [seatunnel] zhilinli123 commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1670708462

   Are you willing to add connector V2 documentation for this? 
   Refer to code:https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/source/Mysql.md
   Issues:https://github.com/apache/seatunnel/issues/4572
   Issues example:https://github.com/apache/seatunnel/issues/4544
   @NickYoungPeng 


-- 
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


[GitHub] [seatunnel] NickYoungPeng closed pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng closed pull request #4803: [Feature][Connector-V2]  jdbc connector supports Kingbase database
URL: https://github.com/apache/seatunnel/pull/4803


-- 
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


[GitHub] [seatunnel] CheneyYin commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "CheneyYin (via GitHub)" <gi...@apache.org>.
CheneyYin commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1633574813

   > > > > > > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > > > > > > 
   > > > > > > > 
   > > > > > > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > > > > > > 
   > > > > > > 
   > > > > > > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplicati
 on.start(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   > > > > > 
   > > > > > 
   > > > > > <img alt="image" width="1720" src="https://user-images.githubusercontent.com/72905543/251966367-a62cf1b3-4785-4a54-9db1-077fc63d3bb3.png">
   > > > > >   in local env is ok,I suspect something is wrong with the container
   > > > > 
   > > > > 
   > > > > [This link may help you to fix client encoding error](https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/)
   > > > 
   > > > 
   > > > I tried the method in the link, but I couldn't resolve the issue.It seems unrelated to the Kingbase database container.I used a local Spark for testing, but the Kingbase database was still the one in the container, and it worked successfully.
   > > 
   > > 
   > > Yes, I have added the spark container, but it can't be solved.
   > 
   > <img alt="image" width="865" src="https://user-images.githubusercontent.com/72905543/253030175-2c577bdb-0c4e-4e97-af9c-9360d8885f06.png">
   
   ```shell
    docker run tyrantlucifer/spark:2.4.6 locale -a
    05:17:56.97 
    05:17:56.97 Welcome to the Bitnami spark container
    05:17:56.98 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-spark
    05:17:56.98 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-spark/issues
   
    05:17:56.98 
   C
   C.UTF-8
   POSIX
   ```
   This container doesn't support `zh_CN.utf-8`.
   And the kingbase container(`huzhihui/kingbase:v8r6`) locale `en_US.UTF-8`.


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1634345386

   <img width="512" alt="Snipaste_2023-07-13_22-25-58" src="https://github.com/apache/seatunnel/assets/72905543/bb4f0926-6f20-4dd8-bc68-f8a46cab6fc3">
   


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1632794254

   > > > > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > > > > 
   > > > > > 
   > > > > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > > > > 
   > > > > 
   > > > > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication.s
 tart(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   > > > 
   > > > 
   > > > <img alt="image" width="1720" src="https://user-images.githubusercontent.com/72905543/251966367-a62cf1b3-4785-4a54-9db1-077fc63d3bb3.png">
   > > >   in local env is ok,I suspect something is wrong with the container
   > > 
   > > 
   > > [This link may help you to fix client encoding error](https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/)
   > 
   > I tried the method in the link, but I couldn't resolve the issue.It seems unrelated to the Kingbase database container.I used a local Spark for testing, but the Kingbase database was still the one in the container, and it worked successfully.
   
   Yes, I have added the spark container, but it can't be solved.


-- 
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


[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288672097


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.
+
+## Supported DataSource Info
+
+| Datasource | Supported versions |        Driver        |                   Url                    |                                             Maven                                              |
+|------------|--------------------|----------------------|------------------------------------------|------------------------------------------------------------------------------------------------|
+| Kingbase   | v8r6               | com.kingbase8.Driver | jdbc:kingbase8://localhost:54321/db_test | [Download](https://repo1.maven.org/maven2/cn/com/kingbase/kingbase8/8.6.0/kingbase8-8.6.0.jar) |
+
+## Database Dependency
+
+> Please download the support list corresponding to 'Maven' and copy it to the '$SEATNUNNEL_HOME/plugins/jdbc/lib/' working directory<br/>
+> For example: cp kingbase8-8.6.0.jar $SEATNUNNEL_HOME/plugins/jdbc/lib/
+
+## Data Type Mapping
+
+|             Kingbase Data type             |                                                                SeaTunnel Data type                                                                |
+|--------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
+| BOOL                                       | BOOLEAN                                                                                                                                           |
+| INT2                                       | SHORT                                                                                                                                             |
+| SMALLSERIAL</br> SERIAL </br>INT4          | INT                                                                                                                                               |
+| INT8 </br>   BIGSERIAL                     | BIGINT                                                                                                                                            |
+| FLOAT4                                     | FLOAT                                                                                                                                             |
+| FLOAT8                                     | DOUBLE                                                                                                                                            |
+| NUMERIC                                    | DECIMAL((Get the designated column's specified column size),<br/>(Gets the designated column's number of digits to right of the decimal point.))) |
+| BPCHAR<br/>CHARACTER<br/> VARCHAR<br/>TEXT | STRING                                                                                                                                            |
+| TIMESTAMP                                  | LOCALDATETIME                                                                                                                                     |
+| TIME                                       | LOCALTIME                                                                                                                                         |
+| DATE                                       | LOCALDATE                                                                                                                                         |
+| Other Data type                            | Not supported yet                                                                                                                                 |
+
+## Source Options
+
+|             Name             |    Type    | Required |     Default     |                                                                                                                              Description                                                                                                                              |
+|------------------------------|------------|----------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| url                          | String     | Yes      | -               | The URL of the JDBC connection. Refer to a case: jdbc:kingbase8://localhost:54321/test                                                                                                                                                                                |
+| driver                       | String     | Yes      | -               | The jdbc class name used to connect to the remote data source, should be `com.kingbase8.Driver`.                                                                                                                                                                      |
+| user                         | String     | No       | -               | Connection instance user name                                                                                                                                                                                                                                         |
+| password                     | String     | No       | -               | Connection instance password                                                                                                                                                                                                                                          |
+| query                        | String     | Yes      | -               | Query statement                                                                                                                                                                                                                                                       |
+| connection_check_timeout_sec | Int        | No       | 30              | The time in seconds to wait for the database operation used to validate the connection to complete                                                                                                                                                                    |
+| partition_column             | String     | No       | -               | The column name for parallelism's partition, only support numeric type column and string type column.                                                                                                                                                                 |
+| partition_lower_bound        | BigDecimal | No       | -               | The partition_column min value for scan, if not set SeaTunnel will query database get min value.                                                                                                                                                                      |
+| partition_upper_bound        | BigDecimal | No       | -               | The partition_column max value for scan, if not set SeaTunnel will query database get max value.                                                                                                                                                                      |
+| partition_num                | Int        | No       | job parallelism | The number of partition count, only support positive integer. Default value is job parallelism.                                                                                                                                                                       |
+| fetch_size                   | Int        | No       | 0               | For queries that return a large number of objects, you can configure <br/> the row fetch size used in the query to improve performance by <br/> reducing the number database hits required to satisfy the selection criteria.<br/> Zero means use jdbc default value. |
+| common-options               |            | No       | -               | Source plugin common parameters, please refer to [Source Common Options](common-options.md) for details                                                                                                                                                               |
+
+### Tips
+
+> If partition_column is not set, it will run in single concurrency, and if partition_column is set, it will be executed  in parallel according to the concurrency of tasks.
+
+## Task Example
+
+### Simple:
+
+> This example defines a SeaTunnel synchronization task that automatically generates data through FakeSource and sends it to JDBC Sink. FakeSource generates a total of 16 rows of data (row.num=16), with each row having two fields, name (string type) and age (int type). The final target table is test_table will also be 16 rows of data in the table. Before run this job, you need create database test and table test_table in your DB2. And if you have not yet installed and deployed SeaTunnel, you need to follow the instructions in [Install SeaTunnel](../../start-v2/locally/deployment.md) to install and deploy SeaTunnel. And then follow the instructions in [Quick Start With SeaTunnel Engine](../../start-v2/locally/quick-start-seatunnel-engine.md) to run this job.
+
+```
+# Defining the runtime environment
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  job.mode = "BATCH"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+  FakeSource {
+    parallelism = 1
+    result_table_name = "fake"
+    row.num = 16
+    schema = {
+      fields {
+        name = "string"

Review Comment:
   such as: @NickYoungPeng 
   ```
   source {
     FakeSource {
       row.num = 10
       map.size = 10
       array.size = 10
       bytes.length = 10
       string.length = 10
       schema = {
         fields {
           c_map = "map<string, array<int>>"
           c_array = "array<int>"
           c_string = string
           c_boolean = boolean
           c_tinyint = tinyint
           c_smallint = smallint
           c_int = int
           c_bigint = bigint
           c_float = float
           c_double = double
           c_decimal = "decimal(16, 1)"
           c_null = "null"
           c_bytes = bytes
           c_date = date
           c_timestamp = timestamp
         }
       }
       }
   }
   ```



-- 
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


[GitHub] [seatunnel] liugddx commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1671109881

   You need to put the screenshot of the e2e test here


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1625587837

   > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > 
   > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   
   hello @TyrantLucifer ,when i test using spark container 
   `invalid value for parameter "client_encoding": "ANSI_X3.4-1968".     spark`


-- 
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


[GitHub] [seatunnel] CheneyYin commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "CheneyYin (via GitHub)" <gi...@apache.org>.
CheneyYin commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1632676368

   > > > > > > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > > > > > 
   > > > > > 
   > > > > > need all success? <img alt="Snipaste_2023-07-07_09-57-44" width="529" src="https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png">
   > > > > 
   > > > > 
   > > > > hello @TyrantLucifer ,when i test using spark container `Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication.s
 tart(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)`
   > > > 
   > > > 
   > > > <img alt="image" width="1720" src="https://user-images.githubusercontent.com/72905543/251966367-a62cf1b3-4785-4a54-9db1-077fc63d3bb3.png">
   > > >   in local env is ok,I suspect something is wrong with the container
   > > 
   > > [This link may help you to fix client encoding error](https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/)
   > 
   > I tried the method in the link, but I couldn't resolve the issue.It seems unrelated to the Kingbase database container.I used a local Spark for testing, but the Kingbase database was still the one in the container, and it worked successfully.
   
   I mean, you can try to configure LC=en_US.UTF-8 for spark container.  Because in the container, LC=POSIX usually.


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288384099


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.

Review Comment:
   > @ic4y Does kingbase have this feature?
   
   sorry kingbase don't support the feature



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1672608505

   > You need to put the screenshot of the e2e test here
   
   it's above and it's folded


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1672626936

   > Wait for ci
   
   `SyntaxError: /home/runner/work/seatunnel/seatunnel/seatunnel-website/docs/connector-v2/sink/Kingbase.md: Expected corresponding JSX closing tag for <td>. (76:55)
   Error:  Client bundle compiled with errors therefore further build is impossible.
     74 | </tr>
     75 | <tr parentName="tbody">
   > 76 | <td parentName="tr" {...{"align":null}}>{`SMALLSERIAL`}</br>{` SERIAL `}</br>{`INT4`}</td>
        |                                                        ^
     77 | <td parentName="tr" {...{"align":null}}>{`INT`}</td>
     78 | </tr>
     79 | <tr parentName="tbody">
   SyntaxError: /home/runner/work/seatunnel/seatunnel/seatunnel-website/docs/connector-v2/source/Kingbase.md: Expected corresponding JSX closing tag for <td>. (77:55)
     75 | </tr>
     76 | <tr parentName="tbody">
   > 77 | <td parentName="tr" {...{"align":null}}>{`SMALLSERIAL`}</br>{` SERIAL `}</br>{`INT4`}</td>
        |                                                        ^
     78 | <td parentName="tr" {...{"align":null}}>{`INT`}</td>
     79 | </tr>
     80 | <tr parentName="tbody">
   npm ERR! code ELIFECYCLE
   npm ERR! errno 1
   npm ERR! seatunnel-website@0.0.0 build: `docusaurus build`
   npm ERR! Exit status 1
   npm ERR! 
   npm ERR! Failed at the seatunnel-website@0.0.0 build script.
   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
   
   npm ERR! A complete log of this run can be found in:
   npm ERR!     /home/runner/.npm/_logs/2023-08-10T02_06_00_437Z-debug.log
   Error: Process completed with exit code 1.`


-- 
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


[GitHub] [seatunnel] liugddx commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1678300358

   > LGTM
   
   Please screenshot the test results. PTAL @ic4y 


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1558450955

   > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   
   
   What  os  environment does e2e need?


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on a diff in pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on code in PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#discussion_r1288318648


##########
docs/en/connector-v2/sink/Kingbase.md:
##########
@@ -0,0 +1,159 @@
+# Kingbase
+
+> JDBC Kingbase Sink Connector
+
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
+## Key Features
+
+- [x] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [cdc](../../concept/connector-v2-features.md)
+
+## Description
+
+> Use `Xa transactions` to ensure `exactly-once`. So only support `exactly-once` for the database which is
+> support `Xa transactions`. You can set `is_exactly_once=true` to enable it.

Review Comment:
   i will test the feature



-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports KingbaseES database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1619665499

   > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   
   can you help me? tell me some skill how can i do it


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1677535043

   > You need to put the screenshot of the e2e test here
   
   https://github.com/apache/seatunnel/pull/4803#issuecomment-1634345386
   https://github.com/apache/seatunnel/pull/4803#issuecomment-1632798856


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1672623257

   > Wait for ci
   
   last ci `Error:  Client bundle compiled with errors therefore further build is impossible.`


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1678371060

   > 
   
   
   
   > > LGTM
   > 
   > Please screenshot the test results. PTAL @ic4y
   
   <img width="1727" alt="Snipaste_2023-08-15_11-19-09" src="https://github.com/apache/seatunnel/assets/72905543/83628a23-bebe-4031-9fb2-5e1c09c1e789">
   <img width="1727" alt="Snipaste_2023-08-15_11-18-02" src="https://github.com/apache/seatunnel/assets/72905543/9ddf4c9d-452c-4ba3-ac87-8ff19babe849">
   


-- 
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


[GitHub] [seatunnel] EricJoy2048 merged pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 merged PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803


-- 
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


[GitHub] [seatunnel] NickYoungPeng commented on pull request #4803: [Feature][Connector-V2] jdbc connector supports Kingbase database

Posted by "NickYoungPeng (via GitHub)" <gi...@apache.org>.
NickYoungPeng commented on PR #4803:
URL: https://github.com/apache/seatunnel/pull/4803#issuecomment-1632781067

   Yes, I have added the spark container, but it can't be solved
   
   > 2023年7月12日 22:50,Chengyu Yan ***@***.***> 写道:
   > 
   > 
   > please add e2e testcase https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e
   > 
   > need all success?  <https://user-images.githubusercontent.com/72905543/251616238-826d67fb-2844-470d-9796-053c51ebbb71.png>
   > hello @TyrantLucifer <https://github.com/TyrantLucifer> ,when i test using spark container Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: jdbc, PluginType: source, Message: com.kingbase8.util.KSQLException: FATAL: invalid value for parameter "client_encoding": "ANSI_X3.4-1968" at org.apache.seatunnel.core.starter.spark.command.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:63) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.spark.SeaTunnelSpark.main(SeaTunnelSpark.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.
 deploy.JavaMainApplication.start(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
   > 
   >  <https://user-images.githubusercontent.com/72905543/251966367-a62cf1b3-4785-4a54-9db1-077fc63d3bb3.png> in local env is ok,I suspect something is wrong with the container
   > This link may help you to fix client encoding error <https://h2c.tech/p/os%E5%AD%97%E7%AC%A6%E9%9B%86%E5%BD%B1%E5%93%8Dkingbase%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5/>
   > I tried the method in the link, but I couldn't resolve the issue.It seems unrelated to the Kingbase database container.I used a local Spark for testing, but the Kingbase database was still the one in the container, and it worked successfully.
   > 
   > I mean, you can try to configure LC=en_US.UTF-8 for spark container. Because in the container, LC=POSIX usually.
   > 
   > —
   > Reply to this email directly, view it on GitHub <https://github.com/apache/seatunnel/pull/4803#issuecomment-1632676368>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARMHGR4DILYITJPMWBSBSRTXP22SHANCNFSM6AAAAAAYKDSXDA>.
   > You are receiving this because you modified the open/close state.
   > 
   
   


-- 
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