loading text file into vertica and finding an issue with spaces between the values in columns
I am loading a text file into vertica using the copy command . It seems like the columns containing data in the database have spaces between the characters in the values.
copy test_schema.tabOne from local'testFile.txt' delimiter E'\t';
copy test_schema.tabOne from local'testFile.txt' delimiter E'\t';
0
Comments
Thanks
I unfortunately can't see the attached PNG image...
A couple thoughts here:
- Is this possibly just an issue with output formatting? You could look at the options in vsql (or in whatever tool you're using) to make sure it's displaying correctly.
- Is the input file in UTF-8 format? Vertica requires UTF-8 and may get confused by files in other encodings. For example, if you load a UTF-16 file (and you're using mostly basic English characters), you'll see a null byte between each character, since for ASCII characters, UTF-16 looks exactly like UTF-8 with every other byte null. (If you want to convert file formats, our "Iconverter" SDK example can do that for you as part of COPY; the "iconv" tool can do so at the command line.)
Adam