Hi All;
I am using the file pattern to read the source files.And during the rejection process i want to capture the row number and the file name into the error log table so that user can know which record is rejected and from which file in the file pattern is it rejected.
Thanks in advance
Thanks;
Syam.
How to capture the file name and row number
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not possible.
The reject link gets rows that do not match the defined metadata. You get the input row as a raw string, in one column. This is not negotiable.
There is a workaround, which is to read the file as a single VarChar column and parse it yourself in a Transformer stage. The Sequential File stage can add a File Name column. You could use a Filter command or stage variables to detemine the line number within the file. You may need to partition on File Name for the stage variable approach to work.
The reject link gets rows that do not match the defined metadata. You get the input row as a raw string, in one column. This is not negotiable.
There is a workaround, which is to read the file as a single VarChar column and parse it yourself in a Transformer stage. The Sequential File stage can add a File Name column. You could use a Filter command or stage variables to detemine the line number within the file. You may need to partition on File Name for the stage variable approach to work.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Wont it be simple to find the file name and row num directly using RowNumberColumn in addition to FileNameColumn rather than, Pre processing all the files and find the file names back with the help of running nubmer.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'