Page 1 of 1

Constraints Rejects and Filtered records

Posted: Tue Jan 23, 2007 3:13 am
by bikan
Hi,

I have a transformer where i basically join 2 different tables from different source. I need to somehow capture the Rejected records and the Filtered records at the same time without additional constraint in the transformer. An example will make it clear

I Have Table A from source1 and Table B from Source2. In the transfomer i have the following constraint
a.Cust_id = b.Cust_id

Now i need the following output
1. Cust_id's which has satisfied the condition
2. Cust_id's which has not satisfied the condtition(without constraint a.cust_id != b.cust_id)
3. Any records that are rejected due to some errors(the job shouldnt fail..but have to capture these error records)

Thanks in advance
Raj

Posted: Tue Jan 23, 2007 3:26 am
by rkdatastage
Hi Raj

Create a reject table/file
Connect the reject table/file to the transformer
enable the Reject record option of Constraints in Transformer stage

The rejected records will be populated into the reject table, the records which are satisfying the condition will be loaded to the target table

Hope you got it

Thanks
RK

Posted: Tue Jan 23, 2007 4:09 am
by bikan
Thanks Mate,

The soultion what you have gave dosen't satify my needs. The reject file/table will contain all the records(filtered records+rejected records) and how will i able to differenciate these?

Posted: Tue Jan 23, 2007 4:49 am
by ray.wurlod
You will need the additional constraint in the Transformer stage that your original requirement peculiarly stated that you don't want to have.

Posted: Tue Jan 23, 2007 5:00 am
by kumar_s
You are doing a lookup, don't you? That case why can't you use Link1.NOTFOUND as a constraint.

Posted: Tue Jan 23, 2007 5:15 pm
by us1aslam1us
Do a lookup on table2 and in the transformer give these constraints for three different outputs.

output1: NOT(lookup.NOTFOUND)
output2: lookup.NOTFOUND
output3: output1.REJECT or output2.REJECT

and check the reject row in the last constraint.