Constraints Rejects and Filtered records

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Constraints Rejects and Filtered records

Post 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
rkdatastage
Participant
Posts: 107
Joined: Wed Sep 29, 2004 10:15 am

Post 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
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You are doing a lookup, don't you? That case why can't you use Link1.NOTFOUND as a constraint.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post 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.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Post Reply