Question

Generate file footer


If I read from an api and generate a csv file, how can I add the number of records read as a footer in the csv file?


3 replies

Userlevel 2
Badge

H @ana00159, Can you please elaborate your requirement?

Something like I invoke a source api and I will get the count of the records that’s read and add it as part as a field at the end of the file. Basically recon information like source count and target count.

Userlevel 5
Badge +1

@ana00159 

You can execute the loop using jython ,groovy or java script to count the number records read from source API .

Declare the count as global variable and store the count value  to a new variable.

Then create the file with the total number of records at the end of the file. .

 

 

 

Reply