Error loading TSV file into Vertica Flex("String of 2 octets is too long for type Varchar(1)" )

maizermaizer Registered User

Hello all,


I'm trying to load some TSV data into Vertica. It has maybe 2000 columns, and the column names are up to 300 characters(3rd party marketing data).


When I try to load into Vertica Flex though, I get the following error:



Error: [Vertica][VJDBC](4800) ERROR: String of 2 octets is too long for type Varchar(1)
SQLState: 22001
ErrorCode: 4800



The commands I put in to create the table and load data:


CREATE FLEX TABLE ad.ptv_job_title()


copy ad.ptv_job_title from local '/Users/al/Documents/jobtitle.txt' parser fdelimitedparser (delimiter
='\t', header=true)


I've been blocked on this for days, any help would be awesome.


  • DerrickRDerrickR Registered User

    I think the problem is with this:


    fdelimitedparser (delimiter='\t', header=true)


    You want the delimiter to be a tab character, but I think you are specifying "backslash tee" instead.




    fdelimitedparser (delimiter=E'\t', header=true)


    - Derrick

  • maizermaizer Registered User

    Thank you again, this works perfectly!

  • SeethaSeetha Registered User

    Above solution works for single octet characters.  How to parse a double-octet characters such as "thorn" (þ) using COPY statement?


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file