Page 1 of 1

Identification of a rejected row

Posted: Mon Jun 02, 2008 11:07 pm
by DS_FocusGroup
Hi all

i am trying to read multiple files from a folder and then writing it to a single table. is there any way to identify, if a row is rejected, which file it belonged to? my guess would be if i am able to load the name of the file while reading the file i can capture the name with the rejected row. not sure how though. maybe the name of the file in one column and the rest of its content in another?
thanks

Posted: Tue Jun 03, 2008 12:06 am
by ray.wurlod
What stage type are you using? What defines "rejected"?

Posted: Tue Jun 03, 2008 12:11 am
by DS_FocusGroup
Teradata as a target. rejected rows can be defined as duplicate rows in the source which are dropped while being loaded or based on some lookup any rejected records.

the main purpose here would be to associate the file name with the source record.

thanks

Posted: Tue Jun 03, 2008 12:35 am
by mahadev.v
There is a property called File Name Column in sequential file stage. Try that out. You cannot propagate the field to the target stage. So probably take a steam out using copy stage and join them back with the rejects link records and then write to the target file.

Posted: Tue Jun 03, 2008 1:14 am
by ag_ram
mahadev.v,

Did you convey this message to DS_FocusGroup that

Enabling option "File Name Column" in the Sequential file Stage will require an Environment variable APT_IMPORT_PATTERN_USES_FILESET to give the File individual file name in the specified column(or default fileNameColumn) when file pattern is selected for retrieving multiple files from a folder with matching the specified pattern.
DS_FocusGroup wrote:rejected rows can be defined as duplicate rows in the source which are dropped while being loaded or based on some lookup any rejected records.
After getting a field as Source file name from the Sequential file Stage, you can further use Remove Duplicate logic in transformer or Sort-filter as to seperate the duplicate records from the Source.

Posted: Tue Jun 03, 2008 9:05 pm
by DS_FocusGroup
thanks