Replies: 2 comments
-
I think at least query should be quoted here to solve that issue, not sure if needed in other places, That FROM database.table in select should be quoted to avoid above issue, I am going to test it and I let you know the results |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fix worked fine just quoting the dbName in the query solved the issue: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using the flink-cdc-connectors SQL Server connector, database names containing dashes (e.g., WPZ0011-01XX) cause an SQL syntax error. Normally, quoting the database name works, but the connector does not allow quoting when specifying the databaseList(). This leads to an error when trying to read tables from such databases.
To Reproduce:
Steps to reproduce the behavior:
Versions:
flink-connector-sqlserver-cdc 3.1.1 using SqlServerSourceBuilder
flink 1.19.1
sqlserver localy with docker image mcr.microsoft.com/mssql/server:2022-latest and tested with real 2022 sql server
Expected behavior
The connector should correctly handle database names with dashes by quoting them internally, avoiding syntax errors.
Error Log
{"applicationARN":"arn:aws:kinesisanalytics:us-east-1:30607720XXXX:application/DataCapturer-an-5889-wpm","applicationVersionId":"3","locationInformation":"org.apache.flink.cdc.connectors.sqlserver.source.utils.SqlServerConnectionUtils.listTables(SqlServerConnectionUtils.java:112)","logger":"org.apache.flink.cdc.connectors.sqlserver.source.utils.SqlServerConnectionUtils","message":"\t skipping database 'WPZ0011-01XX' due to error reading tables: Incorrect syntax near '-'.","messageSchemaVersion":"1","messageType":"WARN","threadName":"SourceCoordinator-Source: ParallelSource"}
Beta Was this translation helpful? Give feedback.
All reactions