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

NIFI - How to route a record\event based on content

Highlighted

NIFI - How to route a record\event based on content

Explorer

Using GetFile I’m collecting files that include JSON records. Each record includes a parameter (let's name it Sensor) that have the Value A or B.

Based on that value I wish to route each record to a different output port – which module I should use? Do I need to split the records or I can stay at the level of the file?

An example of a  record that can be found in the file

 

{"EventTime":"2020-12-07 04:49:00",

"Sensor":"A",

"Keywords":-9223372036854775808,

"EventType":"INFO",

"SeverityValue":2,

"Severity":"INFO",}

4 REPLIES 4
Highlighted

Re: NIFI - How to route a record\event based on content

Super Guru

QueryRecord processor

Highlighted

Re: NIFI - How to route a record\event based on content

Hi @TimothySpann 

 

Thanks so much for pointing me to this processor, it looks so great!!

Re: NIFI - How to route a record\event based on content

Community Manager

@stephane_davy, I'm happy to see that @TimothySpann's solution resolved your issue. Can you please mark the response as the solution? This will make it easier for others to find the answer in the future.


Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Highlighted

Re: NIFI - How to route a record\event based on content

Super Guru

Look at everything that has *Record in the name for anything like CSV, JSON, Parquet, AVRO, Logs.

 

https://www.datainmotion.dev/2020/07/ingesting-all-weather-data-with-apache.html

Don't have an account?