cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Is there a better way to calculate a value and use it throughout a pipleine?

wpenfold
New Contributor III

Hi, often I have a need to calculate a value and then use it several places throughout the pipeline. It gets a little ugly, because using pass-through, I often end up with something like $original.original.original.original.THISTERM. Is there any better way to do that?..some syntax to reference THISTERM wherever it is in the hierarchy? Like with XML, I can use โ€˜//THISTERMโ€™

7 REPLIES 7

dimitri_hristov
Contributor

Well, if I have this in one Mapper Snap:
mapper1_expression

, and then I have that Mapper Snap followed by a second Mapper Snap, in which I have this:
mapper2_expression

,then in the output view of the second Mapper Snap I get this:
mapper2_output

Iโ€™m not sure thatโ€™s what you needed, but I guess, FWIW ๐Ÿ™‚

BR,
Dimitri

Thatโ€™s helpful. Thanks!

christwr
Contributor III

Sometimes itโ€™s useful to have a parent pipeline that executes a child pipeline and passes some values like these as parameters to the child. Then the child can reference them anytime (_parm) without having to keep passing the value along from one snap to the next. Especially useful when pipeline is doing things like document-to-binary where you canโ€™t easily pass the values along.

wpenfold
New Contributor III

Yes, I do that when I can.