Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, so I have to transfer from mysql to hive through database.
My job design looks like this:
The real schema is TTVV."ravenclov"
"select
columna, columnb
from TTVV."+StringHandling.DQUOTE("ravenclov")
When I query with
TTVV."ravenclov" , it produce failed.
tDBInput_2 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"ravenclov"' at line 3
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"ravenclov"' at line 3
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1218)
at
"select
columna, columnb
from TTVV.
ravenclov"
It works, but the records I need is almost 8000, and the result I get is only 29.
What went wrong here?
Any ideas/helps, always be appreciated!
Hi
If the table name contains double quotes, change your query to:
"select
columna, columnb
from TTVV.`\"ravenclov\"`"
About the number of records, I don't think it is a Talend issue, can you double check it? you can also execute same query on other Mysql client to check how many records it returns.
Regards
Shong