'ScrollElasticsearchHttp processor Count in Nifi
Hi am trying to take simple count of "ScrollElasticsearchHttp" processor in nifi. and using QueryRecord after this processor. I have created one new variable and using below Sql
"select count(1) from FLOFILE"
I am expecting result.count value 10000 which is my record count but its always showing record.count value 1.
can someone suggest how should I take count of this ScrollElasticsearchHttp flow.
Thanks !!
Solution 1:[1]
Documentation of ScrollElasticsearchHttp processor:
Each page of results is returned, wrapped in a JSON object like so: { "hits" : [ , , ] }.
Firstly use a EvaluateJsonPath processor:
Destination:flowfile-contentReturn Type:auto-detecthits(dynamic):$.hits
Then use a QueryRecord processor:
count:SELECT COUNT(1) AS COUNT FROM FLOWFILE
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | tonykoval |
