Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[Solved] CsvBulkLoader: Error with line breaks in CSV


Go to End


867 Views

Avatar
derralf

Community Member, 28 Posts

23 December 2016 at 2:14am

Hi community,

maybe this is useful for someone – I searched and tested unsuccessfully for hours...

I wanted to import a large CSV with line-breaks in some Fields (field type "Text") and got errors always on the same lines - no matter how i tried (e.g. escape quotes and double quotes or tried with other enclosures, etc).

It turned out that in CsvBulkLoader large CSV file are splittet into chunks (default value is 1000 lines). Of course this resulted in errors, because the file wasn't splitted at the "real CSV line endings" but somewhere in my multiline-text-fields.

Solution:

In config.yml I increased this value dramatically and the error was gone:

CsvBulkLoader:
  lines: 5000

or in my case:
ProductCsvBulkLoader:
  lines: 90000