Forum Discussion
“Does not support pipeline _parameters” - on the contrary Script snap does support pipeline params
It can be accessed in a script snap by $_pipeline_param_name
Example:
Python
data["pipelineparam"] = $_pipeline_param
JavaScript
new_data.pipelineparam = $_pipeline_param;
also documented over here - https://doc.snaplogic.com/wiki/display/SD/Parameters+and+Fields
I can successfully pass in/out/thru parameters using the Execute Pipeline snap - I couldnt get the Child Pipeline approach to work ($content, _param, $var, $_param never came out the other end) so will just Execute Pipeline with flow control items/choices - I’m feeling pretty confident now so thanks 🙂 And will be using the suggested python syntax when in Script snaps.
Mike
- bojanvelevski4 years agoValued Contributor
Try this in a mapper:
$array.map(x=> parseInt(x) < 10 ? '0'+ x : x.toString())
I included parsing of the elements to ensure handling string numbers. Note that the result of the expression will be an array of strings, which is inevitable due to the numbers with a leading zero (<10)
Related Content
- 5 years ago
- 4 months ago
- 10 months ago