Support Questions

Find answers, ask questions, and share your expertise

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

avatar
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

avatar
Master Guru

QueryRecord processor

avatar
Contributor

Hi @TimothySpann 

 

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

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

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