Cassandra CQLSH TEXT field limit on COPY FROM CSV (field larger than field limit (131072))

[亡魂溺海] 提交于 2019-12-03 23:22:50
mikea

Take a look at this answer:

_csv.Error: field larger than field limit (131072)

You will need to add this solution to the top of the cqlsh file. So after:

import csv
import getpass

csv.field_size_limit(sys.maxsize)

Rather than hacking into the cqlsh file, there is a standard option provided by cassandra to change the field_size_limit. The Cassandra installation includes a cqlshrc.sample file in the conf directory of a tarball distribution. In this file the field_size_limit option can be found and changed. To make cqlsh read it's options from this file, you need to copy the cqlshrc.sample file from the conf directory to the hidden .cassandra folder of your user home folder, and renaming it to cqlshrc.

Cassandra documentation contains more details about it: http://docs.datastax.com/en/cql/3.1/cql/cql_reference/cqlsh.html?scroll=refCqlsh__cqlshUsingCqlshrc

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