How to determine the line no from an input file?

Scenario:
An input file is read from DataReader component , move to couple of Reformat component and finally updates the table using DBoutputTable component.

The problem:
We are able to log the incorrect records but not able to find the line no of the error record from the input file . We need to log the line no in the error log file.

The aim can be achieved by usage of auto_filling feature. Just add one more field to your metadata, that will be fulfilled with global row count value or source row count value.