How to check rows number in a file ? ( count lines in a document )

How to check rows number in a file using Talend ?

Use the component tRowCount.

In this process we will replace the file if it’s empty otherwise we will leave the value if it’s not emplty.

tRowCount

The if condition to check the number of rows is as the following :

((Integer)globalMap.get(“tFileRowCount_1_COUNT”)) == 0

 

If the file is empty , put the value from the tFixedFlowInput otherwise keep what’s in there

keyword : How to check rows number in a file ? ( count lines in a document  ) 

Published by Admin

Amine HALLAM Talend Expert and Ex-Talend employee with 8 years experience with talend technologies,for more information please contact me here.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.