Delete the empty last row in tfileoutputdelimted

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

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.

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download