Why do we need Input rows count in tAggregateSortedRow component?
Hi, I'm little surprised reason behind Input rows count in tAggregateSortedRow component. Could you please let me know the purpose of Input rows count in tAggregateSortedRow component. When i use Input rows count value as ((Integer)globalMap.get("tFixedFlowInput_1_NB_LINE")) in tAggregateSortedRow component. I'm getting a null pointer exception. Could you please provide me the reason for null pointer exception.
Re: Why do we need Input rows count in tAggregateSortedRow component?
The number of records is necessary to recognize the last record reaching the tAggregateSortedRow. The component has to send the last group outside the flow loop because if the input component simply sends its last record the tAggregateSortedRow component does not get an idea about this is the last one and would otherwise does not send the last group. Talend has solved this be expecting the group size. Another approach could be to send a kind of end-record and let the component know "that's it" . Now it is clear the tAggregateSortedRow needs this count at the beginning of the processing. You have used a counter for this which will be filled at the end of the processing!