DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
perspicax



Group memberships:
Premium Members

Joined: 07 Dec 2017
Posts: 11
Location: USA
Points: 96

Post Posted: Wed May 16, 2018 3:30 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
I have set the lookup stage conditions to 'continue' on lookup failure. These lookups are surrogate key lookup. It's defaulting to 0 for these values. Is there a way to default to a different value, let's say -1?

Thanks
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2748
Location: USA
Points: 20598

Post Posted: Thu May 17, 2018 5:05 am Reply with quote    Back to top    

Not directly, but you can set the output column to nullable then check for null in a subsequent Transformer stage then set the value to whatever you want to.

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
UCDI



Group memberships:
Premium Members

Joined: 21 Mar 2016
Posts: 320

Points: 3172

Post Posted: Thu May 17, 2018 11:05 am Reply with quote    Back to top    

if dealing with 'very' large volumes and few failed lookups you may find it more efficient to reject them and only transform the reject link, then funnel back. But generally, the above is the best way. Its more stages to reject but less actual work, as far as I can tell.
Rate this response:  
perspicax



Group memberships:
Premium Members

Joined: 07 Dec 2017
Posts: 11
Location: USA
Points: 96

Post Posted: Fri May 18, 2018 12:41 pm Reply with quote    Back to top    

It works! I was using isnull vs ISNULL to handle and I think it is case sensitive.

In the hash file look up there is a function called NOTFOUND. Is this not relevant in parallel jobs?

Thanks!
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54200
Location: Sydney, Australia
Points: 293961

Post Posted: Sat May 19, 2018 8:06 pm Reply with quote    Back to top    

It's not relevant in parallel jobs because you should use the reject link functionality instead.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours