@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
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 foundanyof 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.