201811510411lw opened a new issue, #11973: URL: https://github.com/apache/seatunnel/issues/11973
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### What happened When `snapshotSplitColumn` is explicitly configured with a physical primary key, SeaTunnel rejects it if the column is not returned by `JdbcDataSourceDialect.getUniqueKeys()`. Example table: ```sql CREATE TABLE test_split_column ( id BIGINT NOT NULL AUTO_INCREMENT, category TINYINT NOT NULL, business_key VARCHAR(64) NOT NULL, PRIMARY KEY (id), UNIQUE KEY uk_business (category, business_key) ); ### SeaTunnel Version 2.3.13-SNAPSHOT The same issue is present on the current dev branch at commit: 1491a8e0ad6f0f77ed4853fd4db3d4ff1cdfbd2e ### SeaTunnel Config ```conf source { MySQL-CDC { url = "jdbc:mysql://<host>:3306/test" username = "******" password = "******" database-names = ["test"] table-names = ["test.test_split_column"] table-names-config = [{ table = "test.test_split_column" primaryKeys = ["id"] snapshotSplitColumn = "id" }] startup.mode = "initial" snapshot.split.size = 4096 snapshot.fetch.size = 512 } } ``` ### Running Command ```shell # The job was submitted through SeaTunnel on Flink # Flink version: 1.18.1 # Equivalent command for a local reproduction: ./bin/start-seatunnel-flink-15-connector-v2.sh \ --config ./config/mysql-cdc-primary-key.conf ``` ### Error Exception ```log Config snapshotSplitColumn not unique key for table test.test_split_column Splitting table test.test_split_column into chunks, split column: category, min: 1, max: 2, chunk size: 4096 ``` ### Zeta or Flink or Spark Version _No response_ ### Java or Scala Version _No response_ ### Screenshots _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
