Hey,
Can we use the copy command with files that are BZ2 compressed? I tried the BZIP option, but am getting an error.
Thank you!
COPY BZ2 Compressed Files?
Moderator: NorbertKrupa
COPY BZ2 Compressed Files?
Thanks,
Juliette
Juliette
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: COPY BZ2 Compressed Files?
What is the syntax you're using? What error are you getting?
See the documentation for an example:
See the documentation for an example:
Code: Select all
\! bzip2 pf1.dat
\! cat pf1.dat.bz2 > pipe1 &
COPY large_tbl FROM :file ON site01 BZIP delimiter '|';
SELECT * FROM large_tbl;
COMMIT;
bunzip2 pf1.dat.bz2
Checkout vertica.tips for more Vertica resources.
Re: COPY BZ2 Compressed Files?
Norbert, thanks for the reply! I looked at your example and realized I had the BZIP keyword in the wrong location of the copy command. It has to be right after the file name; I had it at the end after the DIRECT keyword. After I moved it, I was able to load the data. Duh!
Thanks,
Juliette
Juliette