Delete the empty last row in tfileoutputdelimted

Highlighted
One Star

Delete the empty last row in tfileoutputdelimted

Hi,
I am writing a line by line using tFileoutputdelimited. In row separator i can specify the line feed i.e '\n'. It's working good to write the file upto the N-1 record. My problem is, I don't want an empty line after the last record.
Example
2 records write into a file that contains 3 lines. the last line is an empty.  the reason is due to row separator '\n'.
I don't want the empty line in my file. If the record is 10 then the file line is also 10 only.
Is there any skip empty row option in fileoutputdelimted?
Thanks in advance
 
Highlighted
Six Stars

Re: Delete the empty last row in tfileoutputdelimted

If you read the file (tFileInputDelimited) just after completing your writing, the line count should be correct (2 rows, and no 3). 
Equally, if you put a tJava with System.out.println(((Integer)globalMap.get("tFileOutputDelimited_2_NB_LINE")));  you will have the right amount of lines.
 I don't think that the final "\n"  would cause any problem with the counting.
Highlighted
Five Stars

Re: Delete the empty last row in tfileoutputdelimted

Did you find the solution to the problem? I am tempting the same problem.

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