Unverified Commit 4c46abea authored by Junda Yang's avatar Junda Yang Committed by GitHub

Set neo4j publisher CSV field_size_limit to max (#143)

* set field_size_limit to max

* fix lint

* increase version

* update
parent ecbd944a
import copy
import csv
import ctypes
import logging
import time
from os import listdir
......@@ -16,6 +17,11 @@ from databuilder.publisher.base_publisher import Publisher
from databuilder.publisher.neo4j_preprocessor import NoopRelationPreprocessor
# Setting field_size_limit to solve the error below
# _csv.Error: field larger than field limit (131072)
# https://stackoverflow.com/a/54517228/5972935
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
# Config keys
# A directory that contains CSV files for nodes
NODE_FILES_DIR = 'node_files_directory'
......
......@@ -2,7 +2,7 @@ import os
from setuptools import setup, find_packages
__version__ = '1.4.4'
__version__ = '1.4.5'
requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment