We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


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

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

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.

Comments

  • 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.

     

    Try:

     

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

     

    - Derrick

  • Thank you again, this works perfectly!

  • 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
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file