cancel
Showing results for 
Search instead for 
Did you mean: 

Create a Static Variable

NAl
Contributor

Hi there,

Is there a way of creating a static variable in the Mapper snap so we can assign a default status to pass through the pipeline?

At the moment, we are limited to adding fields from the input schema but want to know if we can override this to add a string that’s been populated with a fixed value.

I understand we could handle this in the system we are integrating with but wanted to know if it was possible to do this in SnapLogic (to centralise operations).

5 REPLIES 5

koryknick
Employee
Employee

NAl
Contributor

This is very useful thanks!

I have about 3 variables to pass through into the Mapper Snap. As well as using Pipeline parameters, I’ve noticed you can just quote the value in the Mapper Snap under Expression and assign it a Target Path. Which method is recommended as best practice I wonder?

jlandells
Former Employee

The best way to think about this is whether or not you’ll need to call the pipeline with different values. If so, use Pipeline Parameters, but set a default to cover your most likely use cases. On the other hand, if these values will never change, simply set them in the Mapper. Note that if you uncheck the ‘=’ to the left of the expression, it changes from being a dynamic expression into a constant:

MapperExample

Hope this helps!

Beautiful, thank you