nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sreehari Puchakayala <sreehar...@infosys.com>
Subject Issue with Custom Query using QueryDatabaseTable Processor
Date Fri, 20 Dec 2019 14:31:08 GMT
Hi NiFi Dev Team,

I am using NiFi v 1.10.0. I am getting the following error when  I use the custom query "select
city_id,city,country_id,last_update from sakila.city" in QueryDatabaseTable processor.

Error at Processor
19:08:15 IST ERROR
QueryDatabaseTable[id=8c1f8b38-016e-1000-66cd-8a6cf89d4bc3] Failed to process session due
to Unable to communicate with database in order to determine column types: org.apache.nifi.processor.exception.ProcessException:
Unable to communicate with database in order to determine column types

Error from nifi-app.txt file
2019-12-20 19:08:25,361 ERROR [Timer-Driven Process Thread-1] o.a.n.p.standard.QueryDatabaseTable
QueryDatabaseTable[id=8c1f8b38-016e-1000-66cd-8a6cf89d4bc3] Failed to process session due
to org.apache.nifi.processor.exception.ProcessException: Unable to communicate with database
in order to determine column types: org.apache.nifi.processor.exception.ProcessException:
Unable to communicate with database in order to determine column types
org.apache.nifi.processor.exception.ProcessException: Unable to communicate with database
in order to determine column types
                at org.apache.nifi.processors.standard.AbstractDatabaseFetchProcessor.setup(AbstractDatabaseFetchProcessor.java:313)
                at org.apache.nifi.processors.standard.AbstractDatabaseFetchProcessor.setup(AbstractDatabaseFetchProcessor.java:236)
                at org.apache.nifi.processors.standard.AbstractQueryDatabaseTable.onTrigger(AbstractQueryDatabaseTable.java:182)
                at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
                at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
                at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
                at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
                at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
                at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
                at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
                at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
                at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: 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 '.city
WHERE 1=0' at line 1
                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:1200)
                at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:329)
                at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:329)
                at org.apache.nifi.processors.standard.AbstractDatabaseFetchProcessor.setup(AbstractDatabaseFetchProcessor.java:273)


Screen shot of the processor:

[cid:image001.png@01D5B770.34B33E80]

I have tried with different databases like MySQL, DB2, etc but the same behavior. Not sure
why its... Can you pl look into this and advise for resolution? Thanks a lot in advance

Best Regards
Sreehari


Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message