First record of stage write is always getting missed
I am passing a json as input to my app driven integration.
I am iterating each record of JSON and writing it into a stage write csv file and im sending that csv file as mail notification. Whenever I run the integration, I can see the first record processed and written to stage write in the logs, but in the file sent in the mail notification, I can only see last two records.
Always the first record is missing in the file sent in mail, but i can see it getting processed and written in stage write as per logs.