Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bulkloader CSV size error

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?

like image 499
hoju Avatar asked May 12 '11 04:05

hoju


1 Answers

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)
like image 68
Calvin Avatar answered Oct 28 '22 02:10

Calvin