0

I have a zipped csv file which is a part of a huge file, and extracted from the original huge file using the following command:

gunzip -c myFile.csv.gz | head -n 500000 > myFile.csv.gz_p1

after making the smaller file, I need to insert it into a table in Redshift, but I get the following error:

Cause: Failed to inflateinvalid or incomplete deflate data. zlib error code: -3
Cyrus
  • 101
  • 4
  • myFile.csv`.gz`_p1 <- highlighted portion causing trouble somewhere? or doubly gzippped data? – Hannu Oct 03 '17 at 09:37
  • I don't know, and would you please clarify what do you mean by doubly gzippped data? is there any data zipped twice? – Cyrus Oct 03 '17 at 16:02
  • There apparently is some kind of trouble with how your data is stored. `echo TEST | gzip -c | gzip -c | od -t x1z` displays the result of compressing "TEST" 'doubly' (twice). – Hannu Oct 07 '17 at 08:35

0 Answers0