Page 1 of 1

Lookup and DataSet Partitioning

Posted: Mon Apr 30, 2007 8:21 am
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

Posted: Mon Apr 30, 2007 8:39 am
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.

Posted: Mon Apr 30, 2007 8:58 am
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.