You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Sven Davison <sv...@gmail.com> on 2016/08/12 23:02:07 UTC

PutSQL ERROR bulletin

I’m getting several inserts but every once in a while (every 1-2 minutes or so)… I get this error. Anyone know what might cause this?

PutSQL[id=b8d54aa6-567a-4686-96bc-1c00e5d43461] Failed to update database due to a failed batch update. There were a total of 1 FlowFiles that failed, 0 that succeeded, and 0 that were not execute and will be routed to retry;


-Sven

Sent from Mail for Windows 10


RE: PutSQL ERROR bulletin

Posted by "Peter Wicks (pwicks)" <pw...@micron.com>.
Sven,

I've run into this a couple times.  In my case some records would insert and some would not.  To find my issue:

 - I routed all failures back to PutSQL
 - Reduced the batch size down to about 10
 - Changed the prioritization on the failure relationship so that hopefully failures will move to the back.

I then let it run until my failure count had stabilized. I stopped the processor and looked at the values. I then built and executed a SQL statement by hand in my SQL editor.

In my case we found two issues:
 - We had Unicode characters being inserted into a non-unicode field (NVARCHAR into VARCHAR)
 - PutSQL requires timestamps to be timestamps, but if you are using a JSONToSQL processor up stream it expects Timestamps to be epoch's, so it can convert them back to timestamps... This was one of our big issues.

Regards,
  Peter

-----Original Message-----
From: Joe Witt [mailto:joe.witt@gmail.com] 
Sent: Friday, August 12, 2016 5:11 PM
To: users@nifi.apache.org
Subject: Re: PutSQL ERROR bulletin

Hello Sven

LogAttributes will just show the attributes as they are understood by the flow file itself.  But the PutSQL processor may be doing something more specific with the data.  Can you share your configuration for PutSQL?

Thanks
Joe

On Fri, Aug 12, 2016 at 7:05 PM, Sven Davison <sv...@gmail.com> wrote:
> Actualy… I’m fairly sure I found it. I sent stuff off to “logAttribute”
> processor and found the input is not escaped.
>
>
>
> http://prntscr.com/c51je3
>
>
>
>
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: Sven Davison
> Sent: Friday, August 12, 2016 7:02 PM
> To: users@nifi.apache.org
> Subject: PutSQL ERROR bulletin
>
>
>
> I’m getting several inserts but every once in a while (every 1-2 
> minutes or so)… I get this error. Anyone know what might cause this?
>
>
> PutSQL[id=b8d54aa6-567a-4686-96bc-1c00e5d43461] Failed to update 
> database due to a failed batch update. There were a total of 1 
> FlowFiles that failed,
> 0 that succeeded, and 0 that were not execute and will be routed to 
> retry;
>
>
>
>
>
> -Sven
>
>
>
> Sent from Mail for Windows 10
>
>
>
>

Re: PutSQL ERROR bulletin

Posted by Joe Witt <jo...@gmail.com>.
Hello Sven

LogAttributes will just show the attributes as they are understood by
the flow file itself.  But the PutSQL processor may be doing something
more specific with the data.  Can you share your configuration for
PutSQL?

Thanks
Joe

On Fri, Aug 12, 2016 at 7:05 PM, Sven Davison <sv...@gmail.com> wrote:
> Actualy… I’m fairly sure I found it. I sent stuff off to “logAttribute”
> processor and found the input is not escaped.
>
>
>
> http://prntscr.com/c51je3
>
>
>
>
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: Sven Davison
> Sent: Friday, August 12, 2016 7:02 PM
> To: users@nifi.apache.org
> Subject: PutSQL ERROR bulletin
>
>
>
> I’m getting several inserts but every once in a while (every 1-2 minutes or
> so)… I get this error. Anyone know what might cause this?
>
>
> PutSQL[id=b8d54aa6-567a-4686-96bc-1c00e5d43461] Failed to update database
> due to a failed batch update. There were a total of 1 FlowFiles that failed,
> 0 that succeeded, and 0 that were not execute and will be routed to retry;
>
>
>
>
>
> -Sven
>
>
>
> Sent from Mail for Windows 10
>
>
>
>

RE: PutSQL ERROR bulletin

Posted by Sven Davison <sv...@gmail.com>.
Actualy… I’m fairly sure I found it. I sent stuff off to “logAttribute” processor and found the input is not escaped.

http://prntscr.com/c51je3



Sent from Mail for Windows 10

From: Sven Davison