cancel
Showing results for 
Search instead for 
Did you mean: 

Is there way to create global variable?

pratiksha_patil
New Contributor II

Hi,

I want to create a global variable so that the same value is accessible anywhere in the pipeline.
In my case I get token from api and I need to pass same token to child pipeline which are executed sequentially.Below is screenshot of pipeline which shows child pipeline execution
image

Thanks,
Pratiksha

8 REPLIES 8

christwr
Contributor III

Unfortunately no such thing as global variables.

There are a few ways to accomplish what I think you’re looking for though:

  • You could have your value as a pipeline parameter. Have a first pipeline that gets your token, and then executes a second pipeline, passing the token as a pipeline parameter. Then that second pipeline will have access to the parameter (like a global variable) for all of his steps (calling other pipelines, etc.)

  • You can keep passing the token along from snap to snap. In your example, the pipeline execute snaps should have output documents with an “original” array containing the data that was passed in to the snap. if your token was part of that, you should be able to use a mapper to put the value back where you want it for the next downstream snaps, etc.

chmurray88
New Contributor II

@dmiller - Are global variables supported yet? If not, do you know when they will be supported? We have lots of use cases for this.

Thanks!

Chris

dmiller
Former Employee

@chmurray88 This has not been implemented. Product Management would need to decide if this is to be implemented.


Diane Miller

chmurray88
New Contributor II

Thanks @dmiller for the follow up.

I’d imagine several customers could use a global variable option. Most modern day DE tools have this option.

If you could pass along the feedback, it would be much appreciated!

Chris