-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Connector-V2][JDBC-connector] support Jdbc dm #2377
Conversation
I imitate MySqlCatalog to DMCatalog, but I don't know it work. |
If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs |
@ic4y PTAL,thx |
Ask any questions at any time. |
ok,I will lately |
TypeMapper is in the method but also in this method Any difference? |
another question, Mysql has the catalog named MysqlCatalog ,and why does PostgreSQL have no catalog such as PostGresqlCatalog? |
There is really no difference between the two, This is indeed repeated in the implementation of the Refer to the implementation under the |
Because only the catalog of mysql is currently implemented, pg has not yet been implemented. DM can also temporarily not implement catalog |
thx,I get , I will modify my code this night |
df82462
to
2b2ce89
Compare
.../java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbTypeMapper.java
Outdated
Show resolved
Hide resolved
...org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbJdbcRowConverter.java
Show resolved
Hide resolved
Have you tested XA-Transaction?, This will be used in exactly-once Sink. And add how to configure exactly-once sink in the document |
Thx for your guide, I will do it this weekend. |
@laglangyue Wait for the JDBC e2e test (#2321) to merge. You need to add test for DM in jdbc e2e test |
I have encountered a difficulty. The PostgreSQL driver is directly introduced and introduced into the Lib of connector-v2. I am afraid this is not appropriate. In the E2E test, I need a driver in the docker. I can manually copy it to the Lib folder of connector-v2-dist, but it will fail if in the CI environment or someone else. Therefore, I wonder whether an additional module, similar to e2e-driver-jar-dist, is required to be provided to E2E test and copied to docker. |
@CalvinKirs Do you have any suggestions |
In our pom just need to provided scope |
In fact, we could have a dist directory dedicated to these jars if we really needed to. (if necessary), but it seems that they are all jdbc driven, as a temporary solution, you can also use the second one. Of course, how you do it is up to you. |
df5ae70
to
e53e5ee
Compare
done |
@ic4y Hi, PTAL |
@ic4y @Hisoka-X @CalvinKirs I has rebased it to dev, and change dependencies,Please review again. |
assertHasData(SOURCE_TABLE); | ||
Container.ExecResult execResult = executeSeaTunnelFlinkJob("/jdbc/jdbc_dm_source_and_sink.conf"); | ||
Assertions.assertEquals(0, execResult.getExitCode()); | ||
assertHasData(SINK_TABLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest check whether the data in the two tables are the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Ihave debugged to check. Verifying the data consistency between sink and source is a public Issue.. I hope to discuss with you in another PR, such as how to preset data and assert verification. I think this is required for all E2E use cases.
Currently, only DM has preset SQL for all fields, and other E2E has only a few fields
...onnector-jdbc-spark-e2e/src/test/java/org/apache/seatunnel/e2e/spark/v2/jdbc/JDBCDmdbIT.java
Outdated
Show resolved
Hide resolved
seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml
Outdated
Show resolved
Hide resolved
seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
Outdated
Show resolved
Hide resolved
...onnector-jdbc-spark-e2e/src/test/java/org/apache/seatunnel/e2e/spark/v2/jdbc/JDBCDmdbIT.java
Outdated
Show resolved
Hide resolved
...onnector-jdbc-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/JdbcDmdbIT.java
Outdated
Show resolved
Hide resolved
...onnector-jdbc-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/JdbcDmdbIT.java
Outdated
Show resolved
Hide resolved
...onnector-jdbc-spark-e2e/src/test/java/org/apache/seatunnel/e2e/spark/v2/jdbc/JDBCDmdbIT.java
Outdated
Show resolved
Hide resolved
...onnector-jdbc-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/JdbcDmdbIT.java
Show resolved
Hide resolved
...onnector-jdbc-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/JdbcDmdbIT.java
Show resolved
Hide resolved
...onnector-jdbc-spark-e2e/src/test/java/org/apache/seatunnel/e2e/spark/v2/jdbc/JDBCDmdbIT.java
Outdated
Show resolved
Hide resolved
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
* [Connector-V2][JDBC-connector] Add DM source and sink connector
* [Connector-V2][JDBC-connector] Add DM source and sink connector
* [Connector-V2][JDBC-connector] Add DM source and sink connector
* [Connector-V2][JDBC-connector] Add DM source and sink connector
Purpose of this pull request
Check list
New License Guide