Bulkloader CSV size error

旧巷老猫 提交于 2019-12-06 20:07:32

问题


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?


回答1:


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)


来源:https://stackoverflow.com/questions/5973363/bulkloader-csv-size-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!