tFileInputDelimited component Trim all columns option not working

Four Stars

tFileInputDelimited component Trim all columns option not working

Hi All, 

 

I would like to know about Trim all columns options present in the Advanced Settings of tFileInputDelimited component.

In my case, I am extracting a .csv file with "~" as field separator.  I have enabled Trim all columns option in the Advanced Settings.

 

Consider the following test record.

SEKAR~NO123 ~XXYYY~INDIA ~23

 

This record has two trailing spaces "NO123 " and "INDIA ". Those two columns were not trimmed while extracting the file.

The record was inserted with trailing space, that led to the lose of data on lookup.

 

I want to know, whether the Trim option will work, once the columns are extracted, or before splitting each column against the separator. Or if this is a bug.

 

Kindly help in this issue.

Thanks in advance.

Thanks & Regards,
Sekar

Accepted Solutions
Employee

Re: tFileInputDelimited component Trim all columns option not working

Hi,

 

    I used the same line shared in your query and I was able to trim the trailing space.

 

    Please refer the screenshot before and after trimming the spaces.

image.pngBefore trim results

 

image.pngAddition of trim in file component

 

image.pngAfter trim results

 

 

The trim will happen after the columns are parsed from the row. 

 

In your case, I am suspecting that the trailing data might not be empty space but some other non readable character.

 

If the error persists, could you please share the sample file where you are having issue for us to verify?

 

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 :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

All Replies
Employee

Re: tFileInputDelimited component Trim all columns option not working

Hi,

 

    I used the same line shared in your query and I was able to trim the trailing space.

 

    Please refer the screenshot before and after trimming the spaces.

image.pngBefore trim results

 

image.pngAddition of trim in file component

 

image.pngAfter trim results

 

 

The trim will happen after the columns are parsed from the row. 

 

In your case, I am suspecting that the trailing data might not be empty space but some other non readable character.

 

If the error persists, could you please share the sample file where you are having issue for us to verify?

 

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 :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Four Stars

Re: tFileInputDelimited component Trim all columns option not working

Hi Nikhil,

 

Thanks for the effort.

Let me try the same, by taking the particular record having trailing space and store it in an another file and let me try to parse it.

Also I have to check whether the trailing one is actually a space or any non-readable junk character.

 

Thanks & Regards,
Sekar
Highlighted
Employee

Re: tFileInputDelimited component Trim all columns option not working

Thanks for the update.

 

Please do not forget to mark the topic as resolved once you are able to resolve the issue :-)

 

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 :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.