All,

I just reviewed and merged this fix. If you need a workaround in the
meantime, if you can change your table such that the 'code' column is
an unsigned bigint, then I think it works. That's what I tested for a
related issue NIFI-2531, but forgot the signed bigint case :(

Regards,
Matt

On Tue, Sep 27, 2016 at 4:54 AM, Pierre Villard
<[email protected]> wrote:
> Hi Yari,
>
> I think there is a JIRA on this problem at the moment:
>
> https://issues.apache.org/jira/browse/NIFI-2811
> https://github.com/apache/nifi/pull/1053
>
> If you have the chance you can try the PR and give us your feedback.
>
> Pierre
>
>
> 2016-09-27 10:23 GMT+02:00 Yari Marchetti <[email protected]>:
>>
>> Hello,
>> I'm trying to use a ExecuteSQL processor performing a query on a table
>> with a BigInt field and it's failing with a:
>>
>> org.apache.avro.file.DataFileWriter$AppendWriteException:
>> org.apache.avro.UnresolvedUnionException: Not in union ["null","string"]: 10
>> at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:296)
>> ~[na:na]
>> at
>> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:160)
>> ~[na:na]
>> at
>> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:83)
>> ~[na:na]
>> at
>> org.apache.nifi.processors.standard.util.JdbcCommon.convertToAvroStream(JdbcCommon.java:74)
>> ~[na:na]
>> at
>> org.apache.nifi.processors.standard.ExecuteSQL$2.process(ExecuteSQL.java:193)
>> ~[na:na]
>> at
>> org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2123)
>> ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>> at
>> org.apache.nifi.processors.standard.ExecuteSQL.onTrigger(ExecuteSQL.java:187)
>> ~[na:na]
>> at
>> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>> ~[nifi-api-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>> at
>> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064)
>> ~[nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>> at
>> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136)
>> [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>> at
>> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
>> [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>> at
>> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
>> [nifi-framework-core-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>> [na:1.8.0_101]
>>
>>
>> I've found this JIRA (https://issues.apache.org/jira/browse/NIFI-2531) and
>> it looks like the very same issue but it's marked as resolved in 1.0.0
>> (which it's the version I'm using). Do you have any idea?
>>
>> The table is on a MySQL 5.7.15 and the schema is like this:
>>
>> CREATE TABLE `test_table` (
>>   `code` bigint(20) DEFAULT NULL,
>>   `name` varchar(20) DEFAULT NULL
>> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
>>
>> Thanks,
>> Yari
>
>

Reply via email to