I have a custom iterator which gives data of multitple entities. For example iterator gives data of Department, Employee and Address. Record's entity type is identified by a field value. And I need to apply different set of operations on each dataset. Ex., Department data may have aggregations, Employee and Address data are simply joined together after some filteration.
If I have different datasets for each entity type the job is easy. So I am trying to split incoming data to different datasets. What is the best possible way to achieve this ?
*Iterator can be read only once.