Solved
Forum Discussion
2 Replies
- koryknickEmployee
salonimaggo - While the solution provided by nativeBasic functionally works, I am concerned with the memory requirements when processing large files. I recommend a slightly different approach using one of SnapLogic's built-in properties, specifically, the snap.in.totalCount property. You can accomplish the same result using a Filter snap and allow your pipeline to work with the streaming data, rather than collecting the entire input file into memory.
Hope this helps!
- nativeBasicNew Contributor III
Hello,
You can group into an array and then:
$myArray.filter((item, pos, a) => (a.indexOf(item)+1)%4 != 0)
% is the MOD function.
Hope it helps!