Help Center/ GeminiDB/ GeminiDB Cassandra API/ FAQs/ Database Usage/ What Can I Do if Error "field larger than field limit (131072)" Is Reported During Data Import?
Updated on 2023-02-23 GMT+08:00

What Can I Do if Error "field larger than field limit (131072)" Is Reported During Data Import?

Symptom

When you import data, the size of a single column exceeds 128 KB. As a result, the Python CSV single-column restriction is triggered.

Error message:

field larger than field limit (131072)

Possible Cause

When Python CSV reads a file, csv.field_size_limit limits the size of a single column.

Solution

  1. Run the following commands in the cqlsh directory to find the cqlshrc file:

    touch cqlshrc

    rm -rf ~/.cassandra/cqlshrc*

  2. Add the following information in the cqlshrc file and save the file:

    [csv] 
    field_size_limit = 9223372036854775807

  3. Add the following parameters when connecting to an instance using cqlsh:

    –cqlshrc=cqlshrc

    Command example:

    cqlsh 127.0.0.1 8635 -u rwuser -p password --cqlshrc=cqlshrc