How to define schema while unzipping a.gz files in tfileunarchieve

Five Stars

How to define schema while unzipping a.gz files in tfileunarchieve

Please let me know where to define schema in tfileunarchieve. It gave the unzip file but with incorrect schemas. It is difficult to extract its scha again.
Thanks in advance

Accepted Solutions
Employee

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Hi,

 

    I believe the issue is with your source file. I created a gz file from a csv file and then unzipped it again to an output folder. When I checked the output file, the file was in right position with proper enter characters.image.png

 

image.pngoutput file

 

 

   One query I am having is the envt where you are building the files. For example, if it was a Linux system which created the zip file and you are trying to read it with a Windows system, sometimes the issue may pop up.

 

    The reason is that in Linux, Line feed is the line line separator but in Windows Line Feed+Carriage return combo is the line separator. Could you please check if this is the case here?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

   


All Replies
Employee

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Hi,

 

tfileunarchive component is used to unzip a file and there are no schema related activities here.

 

If you want to validate the schema, please use tSchemaComplianceCheck component.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Five Stars

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Thanks Nikhil for your response.

My .gz files contains data as
id:name
1:a
2:v
3:4

After uncompressing it is giving result as
Id:name1:a2:v3:4

So, how can I use this type of uncompressed file for further processing.(
no scheme is there)

Is there any other way of unzip the file which retains its schema as
orignal.gz file?

Thanks and regards

Employee

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Hi,

 

   Could you please share a sample file with and without zipping?

 

    I will try some test runs on top the test files.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Five Stars

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Hi Nikhil,

As I have provided earlier
Zipped file---
id:name
1:a
2:v
3:4

Unzipped file---
Id:name:1:a2:v3:4

Thanks for the help!
Employee

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Hi,

 

    I believe the issue is with your source file. I created a gz file from a csv file and then unzipped it again to an output folder. When I checked the output file, the file was in right position with proper enter characters.image.png

 

image.pngoutput file

 

 

   One query I am having is the envt where you are building the files. For example, if it was a Linux system which created the zip file and you are trying to read it with a Windows system, sometimes the issue may pop up.

 

    The reason is that in Linux, Line feed is the line line separator but in Windows Line Feed+Carriage return combo is the line separator. Could you please check if this is the case here?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

   

Five Stars

Re: How to define schema while unzipping a.gz files in tfileunarchieve

Thanks team!!
Issue is with my source file. It is working now.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog