- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to apply group by on json or csv records in nifi..?
- Labels:
-
Apache NiFi
Created ‎06-21-2018 11:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, can anyone please tell me how to apply group by on json or csv records in nifi..?
Created ‎06-21-2018 02:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
