Support Questions
Find answers, ask questions, and share your expertise

Is there any way to build json query with out using Generate flow file processor

Explorer

Hi

I want to generate flow file like below format . Which was used for feed as Query Elastic search processor .We are using Generate flow file for this process. Is there any alternative way to achieve for same

Query

{ "size": 0, "query": { "match_all": {} }, "aggs": { "projects": { "terms": { "field": "project", "size": 100000 }, "aggs": { "cases": { "terms": { "field": "cases", "size": 100000 }, "aggs": { "questions": { "nested": { "path": "questions" } } } } } } } }

Thanks for your time and help

1 ACCEPTED SOLUTION

Super Guru
@Suresh Dendukuri

`GenerateFlowfile` processor creates FlowFiles with random data or custom content, so this processor will output the custom text.

Another way of doing is using `ReplaceText` processor with Replacement Value as your custom text and ReplacementStrategy as AlwaysReplace.

There is `Duplicate flowfile` processor which is intended for load testing this processor will duplicate the incoming flowfile with the number of flowfiles that we configured in the processor.

Apart from this i don't think there is no other processor(s) intended for providing custom text in NiFi.

View solution in original post

3 REPLIES 3

Super Guru
@Suresh Dendukuri

`GenerateFlowfile` processor creates FlowFiles with random data or custom content, so this processor will output the custom text.

Another way of doing is using `ReplaceText` processor with Replacement Value as your custom text and ReplacementStrategy as AlwaysReplace.

There is `Duplicate flowfile` processor which is intended for load testing this processor will duplicate the incoming flowfile with the number of flowfiles that we configured in the processor.

Apart from this i don't think there is no other processor(s) intended for providing custom text in NiFi.

Explorer

Thanks for your time and response

Explorer

Hi

Thanks for your response and time

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.