Skip to main content

CSV file being created with missing lines

Updated over 2 weeks ago

This is usually caused by the data being returned out of order, so the task is creating a CSV file for the first line.
​
Which is one particular order number (for example), then creating a file for the second line which is a second order number, then when it comes to the third line as it relates to the first order, it recreates the file again, and overwrites the original instead of appending it.
​
In order to resolve this, you should sort the data by the key field (order number in the example above) this will ensure that all lines for one order are written to the CSV file before it moves to order 2.

Did this answer your question?