Lookup and DataSet Partitioning

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
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Lookup and DataSet Partitioning

Post by DS_MJ »

Hello:

In the job I do a lookup on the DB2 Dimension table and output it to a Dataset. This is a seperate job.

So I pull the COL_KEY (PK) and COL_ID (FK) into the DataSet.

QUESTION:

Can I inverse the key column and use this Dataset for lookup.....?
So I set the COL_ID to be my Primary key col and COL_KEY the FK

As per my understanding I have to create a seperate dataset and lookup job cause I cannot just flip the key columns in the dataset and use this dataset.

However I am told I can use the old dataset and use a copy stage change the partitioning to Entire on the Input Stage and change the COL_KEY which is the PK to FK and use this same data set. Is this correct...?

Thanks in advance.
MJ
Thanks in advance,
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

So initial lookup job do the following:

Job1

Code: Select all

DB2 Table ---> Transformer ----> Dataset_A

Now to flip the key columns I do the following:
Job2

Code: Select all

Dataset_A --->Transform------>Dataset_B
Some jobs use Dataset_A and some jobs use Dataset_B.

However I am told I can use the Dataset_A with the copystage to flip the key columns.

Code: Select all

Dataset_A ---->Copy_stage---->rest of the job design.
Thanks in advance,
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Post by sud »

Yes you are right, you can use a copy stage.

Code: Select all

DB2 Table ---> Transformer ----> Dataset_B
                   |    
                   |
      rest of the job design

But I think one transformer is redundant, you are not doing anything with the dataset A but using a transformer before and after dataset A is created.
Last edited by sud on Mon Apr 30, 2007 10:21 am, edited 1 time in total.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
Post Reply