[ 
https://issues.apache.org/jira/browse/NIFI-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157632#comment-16157632
 ] 

Matt Burgess commented on NIFI-4238:
------------------------------------

It looks like the driver is returning 0 for the type of the _id_ column, which 
is not a valid Java SQL type: 
http://docs.oracle.com/javase/8/docs/api/constant-values.html#java.sql.Types.BIT

I believe this is because the query returns no rows (which the above appears to 
return none). The SQLite driver doesn't return a type for getColumnType() for 
some reason: https://en.wikibooks.org/wiki/Java_JDBC_using_SQLite/Metadata

We could check for 0 and default the field type to String (shouldn't be too 
troublesome since there won't end up being any records in the flow file), but 
that seems a bit hacky and would only be to support a shortcoming in a 
particular driver.

> Error in QueryDatabaseTable (NiFi CDC support): Unable to execute SQL select 
> query due to org.apache.nifi.processor.exception.ProcessException: Error 
> during database query or conversion of records to Avro
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-4238
>                 URL: https://issues.apache.org/jira/browse/NIFI-4238
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>         Environment: Centos
>            Reporter: Ella
>         Attachments: config_file_1.png, config_file_2.png, config_file_3.png, 
> diagram.png, Error.png, QueryDatabaseTableError.png
>
>
> Hi Guys,
> I should retrieve only the new added records from the DB2 database to a file 
> by NiFi's CDC feature--QueryDatabaseTable processor; however, I have 
> encountered the Error during executing my dataflow scenario. I have 
> respectfully attached the snapshot of Error as well as the dataflow; I would 
> really appreciate if someone helped me after all.
> Thanks a lot.
> Sincerely,
> Ella



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to