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  ) 

Pages:
Edit