Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to apply group by on json or csv records in nifi..?

avatar

Hi, can anyone please tell me how to apply group by on json or csv records in nifi..?

1 REPLY 1

avatar
Master Guru

@rajat puchnanda

Method 1:

You can use Query record processor and add new dynamic property with value as sql query like

select id,count(*) from flowfile group by id

and the processor will run the sql query on the flowfile content then gives the result as output flowfile.

Refer to this link to get more details regarding configuration of Query Record processor.

Method2:

If you are thinking to Group by all like records then you can use Partition Record processor and specify the record path that you want to group by then the processor will groups all the like records into inidividual groups.

Refer to this link to get more details regarding configuration of Partition Record processor.