Large CSV files with newlines are incorrectly splitted for upsert operations
Closed this issue · 3 comments
fuure commented
force version: v0.22.66
The split of large csv files for data loading operations is generating the batches splitting the source CSV file by rows instead of records, because if a file has newline characters in it (i.e. Long or rich text fields), the record uses more than one line in the file.
Batches then are incorrectly generated as they obviously don't meet the expected structure.
You can recreate this simply by creating a large csv file with newlines and insert/upsert/update-ing it on an instance.
cwarden commented
We should use encoding/csv
to read in the csv. splitFileIntoBatches
is simply splitting on newlines.
cwarden commented
Fixed in v0.22.81