How to extract scalar info of json array using EvaluateJsonPath processor?

2016-05-12 Thread Keith Lim
I have a flow file with json array and would like to use EvaluateJsonPath processor the extract the item count of that array. Does the Nifi Expression Language in combination of json path feature supports this without writing script? What is the syntax? Thanks, Keith

Re: Build a CSV file using MergeContent processor

2016-05-12 Thread Bryan Bende
When using the "text" strategy you may have to do shift+enter in the demarcator field to create a new line. On Thu, May 12, 2016 at 3:52 PM, Joe Witt wrote: > Igor, > > I believe it will encode whatever you give it in UTF-8 and place those > bytes in. For absolute control

Re: How to extract scalar info of json array using EvaluateJsonPath processor?

2016-05-12 Thread Aldrin Piri
Hi Keith, Scanning over some of the docs, it does not appear that JsonPath supports a count operator but could possibly be used to extract from your source document that could possibly be manipulated using something like allDelinatedValues [1]. Certainly not the most elegant approach, but could

Re: Build a CSV file using MergeContent processor

2016-05-12 Thread Igor Kravzov
Joe, If I put \n or '\n' the processor adds at as a string. How do i add it as ASCII? On Thu, May 12, 2016 at 2:43 PM, Joe Witt wrote: > Igor, > > MergeContent [1] has a property for this purpose called "Demarcator" > and you can set the "Delimiter Strategy" to "text" and

Re: Build a CSV file using MergeContent processor

2016-05-12 Thread Igor Kravzov
Both options worked. Thanks guys. On Thu, May 12, 2016 at 3:57 PM, Bryan Bende wrote: > When using the "text" strategy you may have to do shift+enter in the > demarcator field to create a new line. > > On Thu, May 12, 2016 at 3:52 PM, Joe Witt wrote: > >>

Re: How to extract scalar info of json array using EvaluateJsonPath processor?

2016-05-12 Thread Aldrin Piri
Hi Keith, I threw together a quick example of how this is done and made it available as a GitHub Gist [1]. In that template, the core logic of transforming the evaluated JsonPath expression result is in the "Count IDs as Attribute" processor which is making use of the 'Advanced' menu for

Re: QueryDatabaseTable errors

2016-05-12 Thread Thad Guidry
The odbc6.jar is in the classpath already ( dropped it into NiFi /lib) The URL is not set because of that (and because it shows Non-Bold, so I assume, optional if I already set in classpath) Logs say: Caused by: java.sql.SQLRecoverableException: IO Error: Invalid connection string format, a

Re: QueryDatabaseTable errors

2016-05-12 Thread Matt Burgess
We can probably do better with the error displayed in the bulletin, maybe by propagating the message from the cause to the RuntimeException or something. > On May 12, 2016, at 6:31 PM, Thad Guidry wrote: > > The odbc6.jar is in the classpath already ( dropped it into

Re: QueryDatabaseTable errors

2016-05-12 Thread Joe Witt
Matt We def can do better. Though I think the first statement he showed is the lifecycle timeout. There should have been another error we could capture and shoe though. Glad you are good to go now thad. Joe On May 12, 2016 6:42 PM, "Matt Burgess" wrote: > We can