I am using a shared container to look up a surrogate key for a given natural key. However, the problem is that the column in the source file which is used as a natural key relates to 2 different fields within the DB2 table in the shared container.
Therefore, depending on which row is being passed in, a different field within the table needs to be referenced in order to obtain the surrogate key.
At the moment I have created 2 Transform jobs, one passing in one of the natural key fields and the other passing in the second one. However, this is effecting performance as the source file is basically being used twice. Is there a way I can combine this into 1 job so that Datastage can tell which field is being passed in and therefore which field to reference on the table ?
Shared Container with 2 Natural Keys
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 197
- Joined: Mon Feb 17, 2003 11:20 pm
- Location: India
Re: Shared Container with 2 Natural Keys
Try using a stage variable and in its description apply the logic to select one of the two different fields. Now pass the value of this stage variable to the shared container.
Thanks and Regards,
-Sumit
Thanks and Regards,
-Sumit
JezT wrote:I am using a shared container to look up a surrogate key for a given natural key. However, the problem is that the column in the source file which is used as a natural key relates to 2 different fields within the DB2 table in the shared container.
Therefore, depending on which row is being passed in, a different field within the table needs to be referenced in order to obtain the surrogate key.
At the moment I have created 2 Transform jobs, one passing in one of the natural key fields and the other passing in the second one. However, this is effecting performance as the source file is basically being used twice. Is there a way I can combine this into 1 job so that Datastage can tell which field is being passed in and therefore which field to reference on the table ?