Page 1 of 1

Can we have mulitple rejects pointing to same physical file

Posted: Mon Jan 24, 2005 8:07 am
by akash_nitj
Hi Techno's
Is it possible to have a single physical file for the mulitple reject links in a Parallel Job. If yes any limitations on its use ?

TIA
Akash

Posted: Mon Jan 24, 2005 8:48 am
by ArndW
That would work if you just push your errors out to a database table and make sure you choose a unique key. Sequential files are 1WnR and I don't think that Datasets are any help there. You could use a parallel merge stage for distinct error flows within the job as well.

Posted: Mon Jan 24, 2005 6:23 pm
by T42
Yes. You would need to be using some form of funnel/join/merge/whatever solution to collect all the reject links, and output the results to a sequential file.

Posted: Mon Mar 07, 2005 3:14 am
by memrinal
If you have several Sequential File Stages writing into the same file in the same job, then that may lead to completely inconsistent result depeding on the partitioning selected by you.
So its better to colletc all the rejects into a funnel and then write to the file.

Posted: Mon Mar 07, 2005 4:48 pm
by mujeebur
You can implement this using Switch with multiple if else clauses and out put the records which ever you dont want to process.

Posted: Mon Mar 07, 2005 5:12 pm
by rsrikant
Hi Akash,

It is very much possible to have a single sequential file for multiple rejects using funnel.

But make sure that all the reject links have save same metadata and collect them in a funnel and pass them to the sequential file.

To identify the reject link from which the row is rejected (this is sometimes difficult since all the reject links have the same metadata) you can add a col generator stage between the reject link and the funnel. Add one column in the metadata (say 'RejectLink') and hard code the value using field properties of the column. Do this for each reject link.

So, after running the job if any rows are rejected, you can view the data in the sequential file and from the value in 'RejectLink' column you can identify from which link that record came.

Regards,
Srikanth Reddy