04-06-2021 09:55 AM
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).
04-06-2021 10:08 AM
Have you looked at using Pipeline Parameters?
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438254/Pipeline+Properties
04-07-2021 01:56 AM
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?
04-07-2021 02:28 AM
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!
04-07-2021 02:48 AM
Beautiful, thank you