In one of my projects, I had a requirement to compress the file using the GZIP format. Talend current tFileArchive component does not allow to compress the file in GZIP compression format.
I have achieved the requirement by writing custom routine and calling the function in tJAVA component.
To compress the file in GZIP compression format, follow the steps mentioned below :
1. Create new custom routine or add following function to existing routine. For step by step instruction on creating custom routines in Talend Open Studio, Click here "Creating Custom routines in Talend or Jasper ETL"
2. Now design the Talend Jobs as per below:
tFileList Component Properties:
tJava Component Properties:
In tJava component provide the parameters values for the routine we have created and call it as mentioned above.
3. Run the Job and check the console output.
4. Check if GZIP compressed files are present in the mentioned folder.
This is How we can easily compress the files in GZIP format. Please let me know, if you have followed any other method for compressing files in gzip format.
This article is written by +Vikram Takkar and published on www.vikramtakkar.com, please let me know, if you see this article on any other website/blog.
No comments:
Post a Comment