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
Contributor

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.

Yes, I do that when I can.