Re: PutSQL ERROR bulletin

2016-08-12 Thread Joe Witt
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 wrote: > Ac

RE: PutSQL ERROR bulletin

2016-08-12 Thread Sven Davison
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

PutSQL ERROR bulletin

2016-08-12 Thread Sven Davison
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 suc

NiFi cluster error

2016-08-12 Thread Sven Davison
I had a working cluster.. now when i try to restart a couple of the child nodes... it stops durring spin up. If i dont start the master node, the child will run until i DO start the master, then it dies. The message is the same in both conditions. "Failed to connect node to cluster due to: java.la

RE: How to deal with decimals while they're not supported?

2016-08-12 Thread Lee Laim (leelaim)
Hi Stephane, I've been porting to an Execute Stream Command (ESC) processor with a python one-liner to do that math, return to the output as an attribute, and finally pass the original to the next processor. It is sufficiently fast for our use case. Argument: -c "from __future__ imp

Re: How to deal with decimals while they're not supported?

2016-08-12 Thread Joe Percivall
Not sure why my email got delayed so late but Conrad's way is definitely an option too. When you know that all the numbers will have the exact same number of decimals it is probably faster than my way (substring vs. a regex). My way will allow you to just grab the most significant decimal point,

Re: How to deal with decimals while they're not supported?

2016-08-12 Thread Joe Percivall
Hey Stephane, Currently working with Decimals in NiFi is like putting a square peg in a round hole. I haven't tried to do it much but for a simple use-case like yours I believe there are two options.  1: Use Expression Language and a Regex to move the decimal2: (Not 100% sure this works) Use the

Re: How to deal with decimals while they're not supported?

2016-08-12 Thread Conrad Crampton
Excellent. Again, haven’t tried it, but could possibly calculate the scaling factor from doing a length of the string after the decimal point. Haven’t really worked this through and may get very complicated. Alternatively you could do another substring on the decimal portion and limit it to just

Re: How to deal with decimals while they're not supported?

2016-08-12 Thread Stéphane Maarek
That works :) That implies knowing a bit about the scale of numbers, but that's a decent workaround. It'd be so great if decimals were supported natively though. Or at least the casting of decimal to int without having to remove the decimal i.e (1.2):toNumber() instead of 1.2:toString().substringBe

Re: How to deal with decimals while they're not supported?

2016-08-12 Thread Conrad Crampton
HI, Can you coerce to a string, take the numbers after the decimal point and use that? So a similar logic to multiplying by 10 then doing the comparison. Obviously have to revert back to number to do the actual comparison though. Haven’t tested but something like… myAttr:toString():substringAfter