Forum Discussion
j_angelevski
5 years agoContributor III
Hi @Henchway,
I don’t know if it is possible to passthrough the last “snap.in.totalCount” number, but I found a workaround for this.
Add a Group by N snap right before you want to write the input documents to a file. (Name the grouped field ‘doc’ for example, with group size = 0 )
Then add a pipeline execute snap with the follwogin parameter:
This will give you the exact number of input documents from the file. And then simply inside the pipeline execute add JSON Splitter to split the grouped docs, CSV Formatter and finally File Writer, but now you can access the _count parameter to get the number of documents from the input file.
Henchway
5 years agoContributor
Thanks for the suggestion, i’ll give it a try!
Best regards
Thomas