Lookup using Stage Variable
Moderators: chulett, rschirm, roy
Lookup using Stage Variable
I want to do a lookup based on a stage variable and not based on any of the columns in the input link. Is it possible ?
No. Use the ellipsis in the Key Expression editor for a list of valid contributors.
You could pass the stage variable down a link and use it in the lookup of a downstream transformer, however. But that would just put you back to doing the look up from the input link.
You could pass the stage variable down a link and use it in the lookup of a downstream transformer, however. But that would just put you back to doing the look up from the input link.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, of course it's possible. You need one Transformer stage to generate the stage variable value. That goes on the output link as an extra column along with all the columns from in input link. In a separate, downstream Transformer stage you perform the lookup, using the extra column as the reference key.
It is not possible to do it in the one Transformer, because all input links are processed before stage variables are evaluated.
It is not possible to do it in the one Transformer, because all input links are processed before stage variables are evaluated.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Lookup using Stage Variable
i agree with ray.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 210
- Joined: Wed Feb 16, 2005 7:17 am
Or... if you already know what the value of your stage variable is going to be!! And if that value is always going to be a constant for each run of the job... then, you can simply hard code that value to the left pane against the columns to be looked up on the right, for the lookup link inside the transformer..
Cheers
Aakash
Cheers
Aakash
L'arrêt essayant d'être parfait… évoluons.
-
- Premium Member
- Posts: 210
- Joined: Wed Feb 16, 2005 7:17 am
Or... if you already know what the value of your stage variable is going to be!! And if that value is always going to be a constant for each run of the job... then, you can simply hard code that value to the left pane against the columns to be looked up on the right, for the lookup link inside the transformer..
Cheers
Aakash
Cheers
Aakash
L'arrêt essayant d'être parfait… évoluons.