- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
JsonQueryElasticSearch reads same data from elastic
- Labels:
-
Apache NiFi
Created 08-01-2024 10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
Created 08-02-2024 08:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
