CSV Reader Line Number (1 reply)
pleroux, if there's an error whilst reading the file, the line number is be part of error.
I think however you're referring errors in transforms downstream.
There is no intrinsic feature in IMan for line numbers, as there is with say the filename SYS.INPUTFILE.
You could create a formula in a Map transform to generate an incrementing value, to simulate the line number. In a new field called LineNumber create the formula.
IIf(%SYS.INPUTFILE = PreviousRecord("SYS.INPUTFILE"), PreviousRecord("LineNumber") + 1, 1)
Thanks
Is there a way to identify the line on a CSV reader transform? When there are errors related to the source data it is useful to return the source file name but with large CSV files the client would also like to see the line number that is the source of the error.