Hi there
Does anybody know if it is possible and how to reference to a stage variable created in a trasformer stage from another trasformer stage?
For example:
---Trasformer Stage "TStage1"
In this stage I createa Stage Variable "X"
-- Trasformer Stage "TStage2"
How can I reference the Stage Variable "X" defined in "TStag1", even if it is possible?
Thank you
Umberto
Stage variables
Moderators: chulett, rschirm, roy
As Balaji has already said, it is not possible; particularly when those transform stages are executed in separate processes. You should pass the data downstream by adding a column with the variable's value to the next transform.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If the second Transformer stage is downstream of the first, all you need to do is to add the stage variable as an extra output column on the output link from the first Transformer stage.
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.
No, in my case the second Trasformer stage is not subsequently to the first. In anycase I have to do that for solve my problem. I've to add an output column and downstream it for all the stages interested.ray.wurlod wrote:If the second Transformer stage is downstream of the first, all you need to do is to add the stage variable as an extra output column on the output link from the first Transformer stage.
Thank you for your help
Umberto
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Load the value in the job's user status area and retrieve it from there in the other Transformer stage. But there's only one user status area.
You can also use system variables @USER0 through @USER4 and @USER.RETURN.CODE to get five more. If you need more than six, you will need to pack them up into delimited strings, use the above methods, and unpack subsequently - using the Field() function.
You can also use system variables @USER0 through @USER4 and @USER.RETURN.CODE to get five more. If you need more than six, you will need to pack them up into delimited strings, use the above methods, and unpack subsequently - using the Field() function.
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.