Bulkloader CSV size error
Asked Answered
M

1

10

Bulkloader raises the following error when importing a CSV file with large cells:

[ERROR   ] Error in data source thread: field larger than field limit (131072)

This is a common problem for the csv module, which can be fixed with:

csv.field_size_limit(sys.maxint)

How can I make bulkloader execute this?

Millibar answered 12/5, 2011 at 4:39 Comment(0)
T
8

Try this:

In bulkloader.yaml add:

python_preamble:
- import: csv_fix
... # the rest of your imports

In csv_fix.py add:

import csv, sys
csv.field_size_limit(sys.maxint)
Tetter answered 12/5, 2011 at 5:26 Comment(1)
Thank you! I really thought there was a bug in the CSV lib.Wilderness

© 2022 - 2024 — McMap. All rights reserved.