cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Snap or Router Snap

amit_saroha
New Contributor III

Hi,
I have an output coming out of a snap like A_20052022, B_20052022, C_20052022. How I can write three different files using these values? Can I use a copy snap or router snap?

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@amit.saroha

Please find the attached pipeline:

TestPipe_2022_05_24.slp (10.3 KB)

BR,
Spiro Taleski

View solution in original post

6 REPLIES 6

SpiroTaleski
Valued Contributor

@amit.saroha

One option is to use the Router Snap:

image

BR,
Spiro Taleski

Thanks, @Spiro_Taleski - Could you please suggest how I can use start with the below -

jsonPath($, “[‘env:Envelope’][‘env:Body’][‘ns0:getIntegrationContentIdResponse’][‘ns1:result’][*][‘ns0:ContentId’]”).startsWith(“EBSPERSON”)

@amit.saroha: Copy snap would simply put all the values (i.e. A_20052022, B_20052022, C_20052022) into 3 files whereas Router snap as suggested by @Spiro_Taleski would do the work for your use case.

Please don’t forget to use an error view if you’re expecting any other value than A_, B_ and C_ as if you don’t write an expression to handle those values, those values will be lost permanently.

Generally, snapLogic suggests to use an expression as “true” and output it to have all the values in this output (you can decide whether or not to use this output file but always a good practice to have all the values as a backup)

SpiroTaleski
Valued Contributor

@amit.saroha

From the path that you posted, I believe that the incoming data/and the field that should be used for routing is an Array. So, probably the data should be split before the routing.

If there is no any confidential information there, you can share the incoming data, so we can see what is the exact format.