Parallel Lookup

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
FanWeik
Participant
Posts: 10
Joined: Mon Apr 26, 2004 11:40 am
Location: Seattle WA

Parallel Lookup

Post by FanWeik »

I apologize that I posted it on the server Forum.

I should rephrase my scenario. The lookup table has only 1 key. To do a lookup against that table, I need to string together 2 fields in the source file for the lookup. I am trying to avoid using the Transformer stage and see if I can concatenate the fields in the Lookup stage.

But when I tried it with Keyvalue1 : Keyvalue2, I got run time errors.

Thanks!!
Fan

************************************************************
Hello,

I also need to do a lookup with a 2-part key in a PX job agaist a DB2 table. I concatenated the 2 fields in the Lookup stage in the format that's mentioned (Keyvalue1 : ":" : Keyvalue2). The compile was ok but the run generated the following error.

main_program: Syntax error: Error in "lookup" operator: Error in input redirection: Error in input parameters: Error in view adapter: Error in binding: Error in field type: Expected identifier; got: "":"", line 91
Expected operator name, got: ")", line 97; text: copy

Thanks for your help!!
Fan


ray.wurlod
Participant

Group memberships:
Inner Circle

Joined: 23 Oct 2002
Posts: 4747
Location: Australia, Asia-Pacific
Points: 29398
Posted: Mon Jan 10, 2005 3:05 pm Reply with quote Back to top

--------------------------------------------------------------------------------
You've moved way off topic! In general you don't use hashed files in PX, and your post indicates that you want to perform a lookup in PX.

Ideally, post the question on the PX forum.

Basically, though, you no longer create a composite key - that's purely for hashed file. Instead, you declare as many key columns as there are key columns in the probe table.

_________________
Ray Wurlod
ABN 57 092 448 518
Education and Consulting Services

Free nations don't develop weapons of mass destruction.
George W. Bush
On that basis, the US is not a free nation.
Ray Wurlod
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How is the key defined? It is just the two values with no space between?

Use the PX expression editor to construct your expression, rather than assuming that ":" is the concatenation operator.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

I'm not in the best of mind right now (overworked the past 3 weeks), so forgive me not understanding this problem very well -- are you attempting to concentate two strings within the Lookup stage?

The only place you are allowed to modify a field is the Modify stage and the Transformer. There may be other stages on the palette that allows it, but those two are the main ones. Lookup stage expect the data to be 'ready' for a lookup by that point.

Let me know if I am misunderstanding you.
FanWeik
Participant
Posts: 10
Joined: Mon Apr 26, 2004 11:40 am
Location: Seattle WA

Post by FanWeik »

Thanks for getting back to me.

You understood perfectly - that was what I was trying to do. In the key expression, the concat function is available for me to choose. I was able to compile the job but got errors during the run.

I talked to the Ascential support and he told me that it was not intended to be available.

So I did what Ray suggested - declare the 2 keys in the lookup table and it works great!!

Thanks for the info on Modify, Transformer and the fact that Lookup Stage expects the data to be in the 'ready' state.

Fan
Post Reply