Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

igor.rmarinho_185445 avatar image
igor.rmarinho_185445 asked ·

COPY FROM command returns error "field larger than field limit (131072)"

Hi guys,

I'm having an issue when I use COPY from .csv

Starting copy of employee_by_id with columns [company_id, employee_id, access_code, access_code_expiration_date_time, avatar_url, birth_date, current_employments, email, external_code, external_id, first_name, last_name, minor, modified_date, past_employments, punch_badge_id, seniority_date, status, username, wj_admin].
<stdin>:1:Failed to import 2000 rows: Error - field larger than field limit (131072),  given up after 1 attempts
<stdin>:1:Exceeded maximum number of insert errors 1000
<stdin>:1:Failed to process 2000 rows; failed rows written to import_employee_by_id.err
<stdin>:1:Exceeded maximum number of insert errors 1000

I already modified the file both files below ( I was not sure why it had this cqlshrc.default, so I changed both)

-rwxrwxrwx  1 cassandra cassandra  1418 Mar 19 16:41 cqlsh
-rwxr-xr-x  1 cassandra cassandra  1418 Mar 19 16:41 cqlshrc.default

and added

[csv]
field_size_limit = 1000000000

But the error still happening... what could it be?

Thank you

cassandracopycsv
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@igor.rmarinho_185445 You need to copy the sample cqlshrc file and place it in the OS user's home directory under the .cassandra/ subdirectory, i.e. ~/.cassandra/cqlshrc.

Modifying the sample files will not make a difference since it will not get picked up by cqlsh and it will continue to use the default 128KB field size limit. For details, see Configuring a cqlshrc file. Cheers!

4 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi Erick, Thanks a lot! I copied the file to right place :)


About the same subject do know a work around to avoid this error when exporting a table?


ntly given up after 0 rows and 5 attempts)
<stdin>:1:Exported 22 ranges out of 25 total ranges, some records might be missing
Processed: 594027 rows; Rate:     136 rows/s; Avg. rate:     419 rows/s


0 Likes 0 · ·
Erick Ramirez avatar image Erick Ramirez ♦♦ igor.rmarinho_185445 ·

If I may make a friendly request, please post a new question since it's a different issue to the one you originally logged and I'd be happy to respond. Cheers!

1 Like 1 · ·

Is increasing the timeout, would be an ideal solution for it?


stdin>:1:Exported 22 ranges out of 25 total ranges, some records might be missing


0 Likes 0 · ·
Erick Ramirez avatar image Erick Ramirez ♦♦ igor.rmarinho_185445 ·

P.S. Your post wasn't an "answer" so I've converted it to a comment. This is to prevent other users from confusing it as an answer. Cheers!

1 Like 1 · ·