Our sales team are extracting the months sales opportunities, actuals etc. Within the one CSV file there are potentially 100+ rows. Now, we need to create new flow files (array?) containing individual sales people. We have 20+ sales people each working on many opportunities.
salesOpId,salesRepId, salesOpStage, .....
142435,135235,inception ....
142436,572856,inception ....
142437,135235,pipelining ....
142435,572856,inception....
149468,135235,contract....
149464,135653,contract....
As you can see
salesRepId 135235 is working against 3 opportunities, (142436,142437,149468)
salesRepId 572856 is working against 2 opportunities (142436, 142435)
salesRepId 135653 is working on a single opportunity (149464)
For this example I need 3 FlowFiles created (which will be sent to their respective managers); I'm capable of reading the CSV changing it to Json; but now I'm completely stumped on the next step - split the json?
Any help would be greatly appreciated.
Ron M.