Skip to content
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

mysql - mssql #187

Open
davegartside opened this issue Apr 23, 2024 · 3 comments
Open

mysql - mssql #187

davegartside opened this issue Apr 23, 2024 · 3 comments

Comments

@davegartside
Copy link

Hello, trying to sync an INT column between mysql and mssql.

I get:

2024-04-23 10:54:27,451 ERROR ReplicaTask:69 ERROR in TaskId-0 inserting data to sink table: [An error occurred while converting the Long value to JDBC data type INTEGER., class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap

varchar works as expected

ReplicaDB-0.15.1-no-oracle.zip
Ubuntu 22.04.3 LTS
openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode, sharing)

Any help gratefully recieved. Thanks.

@MichalisDBA
Copy link

Hey @davegartside what is the Column Type of MySQL and MSSQL?

Have you tried to convert the source column to string and transfer it to the sink INT column?

@davegartside
Copy link
Author

both column types are int
converting it by doing this

source.query=SELECT convert(id,char) FROM glpi_computers

fixes it but feels wrong given they are both the same datatypes...

@MichalisDBA
Copy link

I have done something similar from MSSQL to Oracle. As long as the sink Data are correct nothing to worry. I don't know the internal mechanics of jdbc. Maybe @osalvador has an answer to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants