Support Questions

Find answers, ask questions, and share your expertise

JsonQueryElasticSearch reads same data from elastic

avatar
Explorer

@mburgess --I am using JsonQueryElasticSearch  to fetch data from elastic .I am using query to fetch only  one record using a particular event_id the processor reads the same data and duplicate records are stored in Oracle DB

1 REPLY 1

avatar
Master Mentor

@Adyant001 

The JsonQueryElasticSearch processor does not store state.  If the processor has no inbound connection, it will be scheduled to execute its code using the configured properties and scheduling configured.  So upon every execution it is going to make the same same query to ElasticSearch.

This processor can also be triggered by an inbound FlowFile. So you would have some upstream dataflow to build a query in to its content and that FlowFile is fed to the JsonQueryElasticSearch processor to fetch that specific result.  The processor would then not execute again until it received another inbound FlowFile to trigger the execution.

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt