Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Contributor

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

avatar
Master 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

avatar
Master 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.

avatar
Contributor

Thanks for your time and response

avatar
Contributor

Hi

Thanks for your response and time