Differentiate reject links in lookup with multiple ref links

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Differentiate reject links in lookup with multiple ref links

Post by jerome_rajan »

Hi All,

I have a job that looks like this:

Code: Select all

                       ORA
                         |
                         |
                        TXN
                       |  |  |
                       |  |  |
           ORA---------->LKP------>
                          |
                          |
                      COLGEN
                          |
                          |
                          DS
Each of the 3 reference links contain one ID each. Now, whenever a certain ID is rejected because it was not present in the reference, I need to add the appropriate reason in the column generator and store it in the dataset. The problem here is that I am not able to differentiate between the rejects and hence the reason added in the Column generator is generic to all 3 ids. the requirement is to have a specific reason.

I do not want to use 3 different Lookup because at this point that would mean dismantling a lot of other jobs which use a similar approach.

Any suggestions gurus?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Re: Differentiate reject links in lookup with multiple ref l

Post by jerome_rajan »

Looks like I do not know how to align the diagram. The top oracle connector goes to a transformer that splits data into 3 links which go to the lookup as reference links.

the stream link is from the other oracle connector. The reject link is from the lookup that goes to a column generator. The output of the generator goes to a dataset
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

Why not use a transformer instead of column generator and check which particular ref link has caused the reject (by checking the nullability of key columns from reference) and then assign appropriate reasons.

I understand transformer is bulky when compared to column gen but column generator isn't intelligent enough to satisfy your requirement
- Zulfi
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Now was it not as simple as that! Thanks a million! Really appreciate it.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Server or parallel job? The answer will be different.

You posted in the Server forum but marked your job type as parallel.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Sorry Ray. It's a parallel job. Can this be moved to the Parallel forum?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Just one more scenario that I am posed with.

None of my keys are nullable. Basically all the reference links carry an ID for a corresponding key in the stream link.

Sample Record in stream: A,B,C,D,E

There would be an ID in the reference link corresponding to each column s that my target would be

A,1,B,2,C,3,D,4,E,5

How should I be filtering this in the transformer on the reject link? Or is there an alternative?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Never mind. Solved this by setting reject failure to 'Continue' and filtering the resulting nulls.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

jerome_rajan wrote:Sorry Ray. It's a parallel job. Can this be moved to the Parallel forum?
Yes, of course... done.

Also, please make use of the Reply to topic button, there's no need to quote everything every time you reply. See how much nicer things look now?

Lastly, the forum software removes all "extra" whitespace which is what destroyed your ASCII art. The

Code: Select all

[/b] tags, however, preserve whitespace which is the secret to making diagrams that line up. Next time use them and make liberal use of the Preview option to make sure things look correct before you post.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

I am relatively new to this forum and am still getting used to the 'Best Practices'. Your information helped that cause. Thank you :)
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
Post Reply