You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Yari Marchetti <ya...@buongiorno.com> on 2016/09/27 08:23:40 UTC
ExecuteSQL & BigInt fieds
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
Re: ExecuteSQL & BigInt fieds
Posted by Yari Marchetti <ya...@buongiorno.com>.
Just recompiled with pull/1053, testing with two different tables, with
both signed and unsigned BIGINT and it works!
Thanks, Pierre & Matt
Yari
On 27 September 2016 at 16:52, Matt Burgess <ma...@apache.org> wrote:
> 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
> <pi...@gmail.com> 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 <yari.marchetti@buongiorno.com
> >:
> >>
> >> 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.convertT
> oAvroStream(JdbcCommon.java:160)
> >> ~[na:na]
> >> at
> >> org.apache.nifi.processors.standard.util.JdbcCommon.convertT
> oAvroStream(JdbcCommon.java:83)
> >> ~[na:na]
> >> at
> >> org.apache.nifi.processors.standard.util.JdbcCommon.convertT
> oAvroStream(JdbcCommon.java:74)
> >> ~[na:na]
> >> at
> >> org.apache.nifi.processors.standard.ExecuteSQL$2.process(Exe
> cuteSQL.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(Exe
> cuteSQL.java:187)
> >> ~[na:na]
> >> at
> >> org.apache.nifi.processor.AbstractProcessor.onTrigger(Abstra
> ctProcessor.java:27)
> >> ~[nifi-api-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
> >> at
> >> org.apache.nifi.controller.StandardProcessorNode.onTrigger(S
> tandardProcessorNode.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.TimerDrivenSchedulingA
> gent$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
> >
> >
>
Re: ExecuteSQL & BigInt fieds
Posted by Matt Burgess <ma...@apache.org>.
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
<pi...@gmail.com> 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 <ya...@buongiorno.com>:
>>
>> 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
>
>
Re: ExecuteSQL & BigInt fieds
Posted by Pierre Villard <pi...@gmail.com>.
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 <ya...@buongiorno.com>:
> 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
>