tfileinputpositional component trim all option not working

Five Stars

tfileinputpositional component trim all option not working

Hi Guys,

 

I am facing issue in reading loading the file to mysql as my source tfileinputPositional is not trimming columns as expected . please find attached files and suggest a solution.pic1.pngthis record shouldn't have loaded to target as i have restricted null in col1 2 ,col3 etc ...pic2.pngthis is how file looks in notepad++ with view show all charsview

 

please help ...

 

Fifteen Stars TRF
Fifteen Stars

Re: tfileinputpositional component trim all option not working

Is "Trim all columns" option ticked on Advanced settings for the tFileInputPositional component?

TRF
Five Stars

Re: tfileinputpositional component trim all option not working

yes  please find below screenshot, also if I am using tSchemaComplianceCheck it is able to recognize the null/white spaces cols ... this looks weird to me. 

 

pic4.JPG

Employee

Re: tfileinputpositional component trim all option not working

Hi,

 

    I did a quick job execution using below data and Talend job spec.

 

image.png

 

image.png

 

image.png

 

The input component is trimming the data to empty string instead of null. There are two schools of thought here. In the case of positional files, the data can be considered as an empty string or data can be considered as null. My personal opinion is that it should be considered as null. 

 

At the same time, the component is currently considering it as empty string and is sending to downstream component to make a choice by the user (like in tMap in my example). If you think that it should be null, could you please create a JIRA ticket so that we can get the view of Product team in this matter?

https://jira.talendforge.org

 

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: tfileinputpositional component trim all option not working

that helped me a lot nikhilthampi ....

here is the Jira raised by me TDI-43054.

 

Regards,

sudhee.reddy

 

 

Five Stars

Re: tfileinputpositional component trim all option not working

I have one more followup ? on this , if I am using tSchemaCompliance check this record (with blank column) is going into reject record instead of inserting (that is what is expected).I am presently using the below to load the target ... please let me know if this is the better way or handling empty string in tmap is better ?pic5.JPG

Employee

Re: tfileinputpositional component trim all option not working

Hi Sudheer,

 

      This should be fine in your use case since the intention is to verify whether there is any problem in schema and the tSchemComplianceCheck is the right 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

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

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog