zip

One Star

zip

Hi,
How to make a gzip file in talend..
I have 10 files and it has to zip with gzip format is that possible in talend?
Five Stars

Re: zip

use tFileArchive file your job design should be like this
tFileList--tFileArchive
pass file name from tFileList to tFileArchive from goloble variable, and please refer Talend User guide for more information.
Moderator

Re: zip

Hi,
Please see the related component references tFileArchive.
Unchecked the "All files" option, and you can set the Filemask for your specified files
See my screenshot
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: zip

hi,
thanks .. But problem is when i upload this gzip file into redshift we are not able to load into the amazon redshift database. so i am thinking there might be the problem with gzip which is not supporting equvalent to redshift
Moderator

Re: zip

Hi,
I have never load .gzip file into DB. Perhaps you should take a consideration on field type or something else on DB. If the .gzip files are correct, I think the tFileArchive is alright.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: zip

I am actually trying to do the same exact thing. Load a gzip file into s3 and then use RedShifts copy command along with its gzip feature to push the data into RedShift.
I have used tFileArchive to gzip the file and result in the following error:
Error : ERROR: Failed writing body (0 != 8645) Cause: Failed to inflateinvalid or incomplete deflate data. zlib error code: -3
I run into no issues when I use the command "gzip -c file.txt > file.gz" to gzip the file.
One Star

Re: zip

Hi,
If it is linux os there will be no problem but if i want to do it in windows how can i resolve my issue?
One Star

Re: zip

I suggest downloading a program that can perform gzip on windows and then execute the program using the cmd talend component.
Seventeen Stars

Re: zip

You can consider writing some code in a tJava. Java core library has a class to create GnuZip files.
Here an example:
http://www.xyzws.com/Javafaq/how-to-make-a-gzip-file-in-java/215
One Star

Re: zip

An error occurred when executing the SQL command:

ERROR: Failed writing body (0 != 8576) Cause: Failed to inflateinvalid or incomplete deflate data. zlib error code: -3
Detail:
-----------------------------------------------
error: Failed writing body (0 != 8576) Cause: Failed to inflateinvalid or incomplete deflate data. zlib error code: -3
code: 9001
context: S3 key being read : s3://file.txt.gz.007
query: 7947
location: table_s3_scanner.cpp:383
process: query1_22
-----------------------------------------------
Execution time: 0.64s
1 statement(s) failed.
How to fix this issue?
Seventeen Stars

Re: zip

SQL?
My suggestion was to use the Java library in a tJava component. I have no clue what you are trying here?