Skip to main content

Can we load a file using COPY command which has all keyboard characters

  • September 17, 2013
  • 2 replies
  • 19 views

chandra_1
Hi, I have a file which has every special character present in it. i mean file has pipe,dobble quotes ..etc how to load such files into VERTICA database using COPY command. i can't run it using delimiter '|' as file has pipe in it. In the same way i can't use ENCLOSED BY '"' also as the file has double quotes presnt in it. Can anyone suggest how to load this file without loss of any character. Thanks in advance..:)

2 replies

Daniel_Leybovic
Forum|alt.badge.img+1
Hi! What is delimiter of file? Can you change it? If yes, so I don't believe you have ESC(\x027) or BELL(\x007) char in fields. Vertica accepts any ASCII char except NIL(\x000) as delimiter, so I suggest you to define delimiter as one of these non-printable CHARs. If you can't change a delimiter, so you in trouble, I don't think any DB can resolve it.

Forum|alt.badge.img+2
  • Participating Frequently
  • September 24, 2013
Any chance the data file is fixed width?  If so, then I dont believe you would need a delimiter or to quote strings.

You can get more information about loading fixed width files at the below link:

https://my.vertica.com/docs/6.1.x/HTML/index.htm#17490.htm