Ignoring first line and last line of a csv file

Highlighted
One Star

Ignoring first line and last line of a csv file

Hi all,
i have to read a csv file, but i have to ignore the first and the last line of that file because they are only control lines. I used tFileInputPositional.
How can solve removing those lines?
Any help appreciated.
Thanks

Luke
Highlighted
Seventeen Stars

Re: Ignoring first line and last line of a csv file

hi,
in the component properties you've put the numbre of line to skip (in your case 1 ) for header and footer.
In case you use a metadata at the "step 3 of 4" do the same.
Highlighted
One Star

Re: Ignoring first line and last line of a csv file

I put this values in the component, but the componet seems to read again the first and last lines.
I am using talend 2.4.2
Highlighted
One Star

Re: Ignoring first line and last line of a csv file

i think in particular that the if i set the value 1 in the footer field, the last line is processed the same.
Highlighted
Seventeen Stars

Re: Ignoring first line and last line of a csv file

did you try with metadata tFilePosionnal !?
'cause I always use this way to create a new component (i can re-use it anyway) , and it's work fine !!(test the result by a "refresh...") ...
Highlighted
One Star

Re: Ignoring first line and last line of a csv file

Do you create a tFilePositional directly from the metadata repository?
Highlighted
One Star

Re: Ignoring first line and last line of a csv file

No i don't use it, i tried it also. but didn't worked.
Highlighted
Community Manager

Re: Ignoring first line and last line of a csv file

Hello
I tried it and it works fine on TOS2.4.2. You need to set the Header:1;Footer:1
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER 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

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