zhaowq32 opened a new issue, #10050:
URL: https://github.com/apache/seatunnel/issues/10050

   ### 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
   
   ```
   // MySqlCatalog.java
   protected String getTableWithConditionSql(TablePath tablePath) {
           return String.format(
                   SELECT_TABLE_EXISTS, tablePath.getDatabaseName(), 
tablePath.getTableName());
       }
   ```
   Why is the WHERE clause in the SQL statement using `table_schema`, but the 
parameter passed in is database name?
   
   ### SeaTunnel Version
   
   2.3.12
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval = 100
   }
   
   source {
     MySQL-CDC {
       url = "jdbc:mysql://localhost:13306/test-database"
       database-names = "test-database"
       username = "user"
       password = "password"
       table-names = ["test-database.mysql.user"]
       startup.mode = "initial"
     }
   }
   
   sink {
     Console {
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   bin/seatunnel.sh --config ./job/mysql.job -m local
   ```
   
   ### Error Exception
   
   ```log
   Caused by: org.apache.seatunnel.common.utils.SeaTunnelException: Can not 
find catalog table with factoryId [MySQL]
        at 
org.apache.seatunnel.api.table.catalog.CatalogTableUtil.lambda$getCatalogTables$0(CatalogTableUtil.java:131)
        at java.base/java.util.Optional.map(Optional.java:260)
        at 
org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:118)
        at 
org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:98)
        at 
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.MySqlIncrementalSourceFactory.lambda$restoreSource$2(MySqlIncrementalSourceFactory.java:118)
        at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:180)
        at 
org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:136)
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] 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]

Reply via email to