Create a Static Variable

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).

Have you looked at using Pipeline Parameters?

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438254/Pipeline+Properties

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?

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:

Hope this helps!

Beautiful, thank you