Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Highlighted

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

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

1 REPLY 1
Highlighted

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

Super 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.

Don't have an account?
Coming from Hortonworks? Activate your account here