cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Pass parameter value

Siva_Venna
Contributor

here in the mapper1 I am defining one of the target path as parameter(_messagetype), is it possible to pass this value to file writer snap ?
I have defined the same parameter in pipeline properties with value as null
image

5 REPLIES 5

Supratim
Contributor III

@Siva_Venna No Siva, the pipeline param are static and final, canโ€™t change or canโ€™t assign as target value in mapper.

thank you @Supratim
my pipeline exposed as triggered task and it has to accept different files and write to destination location. is there a solution to pass file name dynamically based on input file content(files will contain attribute that define file name)?
image

patan
New Contributor III

@Siva_Venna You can declare the pipeline parameter and pass the value for it from the calling environment of your trigger task, then you can refer the same parameter reference in the pipeline to create the file.

Please see the below screenshot:

image

Refer the below documentation link for more information on how to pass the pipeline properties as query params for a trigger task.
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/986383617/Passing+Pipeline+Arguments+to+Tr...

Also you donโ€™t have to parse and then format the file content instead you can even write directly to the file using FileWriter snap.

thanks @patan
I can declare a parameter and reference it but the system invoking this pipeline will not be able to pass the parameter value.