Copy Snap or Router Snap

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?

@amit.saroha

One option is to use the Router Snap:

BR,
Spiro Taleski

1 Like

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)

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

@Spiro_Taleski - Thank you. Please see the below output -

[
{
“env:Envelope”:
{
@xmlns:env”:
http://schemas.xmlsoap.org/soap/envelope/
@xmlns:wsa”:
WS-Addressing 1.0 Namespace
“env:Header”:
{
“wsa:Action”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/FlowActionsService/getIntegrationContentIdResponse
“wsa:MessageID”:
“urn:uuid:ae30eca6-4e5f-40b5-a5dc-7fe503c0943e”
}
“env:Body”:
{
“ns0:getIntegrationContentIdResponse”:
{
@xmlns:ns0”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/
“ns1:result”:
[
{
@xmlns:ns1”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/
@xmlns:ns0”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowControllerService/
@xmlns:xsi”:
http://www.w3.org/2001/XMLSchema-instance
@xsi:type”:
“ns0:IntegrationContentVOSDO”
“ns0:Status”:
“SUCCEEDED”
“ns0:IntegrationName”:
“EBSPERSON”
“ns0:ContentId”:
“EBSPERSON_500329”
“ns0:ProcessId”:
“500329”
}
{
@xmlns:ns1”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/
@xmlns:ns0”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowControllerService/
@xmlns:xsi”:
http://www.w3.org/2001/XMLSchema-instance
@xsi:type”:
“ns0:IntegrationContentVOSDO”
“ns0:Status”:
“SUCCEEDED”
“ns0:IntegrationName”:
“EBSPERSONADD”
“ns0:ContentId”:
“EBSPERSONAD_500329”
“ns0:ProcessId”:
“500329”
}
{
@xmlns:ns1”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowActionsService/types/
@xmlns:ns0”:
http://xmlns.oracle.com/apps/hcm/processFlows/core/flowControllerService/
@xmlns:xsi”:
http://www.w3.org/2001/XMLSchema-instance
@xsi:type”:
“ns0:IntegrationContentVOSDO”
“ns0:Status”:
“SUCCEEDED”
“ns0:IntegrationName”:
“EBSPHONE”
“ns0:ContentId”:
“EBSPHONE_500329”
“ns0:ProcessId”:
“500329”
}
]
}
}
}
“httpHeaders”:
{
“Connection”:
“keep-alive”
“Content-Language”:
“en”
“Content-Length”:
“1955”
“Content-Type”:
“text/xml; charset=UTF-8”
“Date”:
“Tue, 24 May 2022 13:43:03 GMT”
“Referrer-Policy”:
“same-origin”
“SOAPAction”:
“”""
“Set-Cookie”:
“JSESSIONID=; expires=Thu, 01-Jan-1970 01:00:00 GMT; path=/; HttpOnly;SameSite=None;Secure,_WL_AUTHCOOKIE_JSESSIONID=; expires=Thu, 01-Jan-1970 01:00:00 GMT; path=/; secure; HttpOnly;SameSite=None;Secure”
“Strict-Transport-Security”:
“max-age=31536000; includeSubDomains”
“X-Content-Type-Options”:
“nosniff”
“X-Frame-Options”:
“SAMEORIGIN”
“X-ORACLE-DMS-ECID”:
“005rw8YlitH2VOHLmu5EiZ0001P90007yK”
“X-ORACLE-DMS-RID”:
“0:3”
“X-XSS-Protection”:
“1; mode=block”
}
“original”:
{
“process_log_ID”:
124653
“job_result”:
“SUCCESS”
“job_message”:
“”
“flowTaskInstanceName”:
“HCM_to_EBS_Interface”
“flowInstanceName”:
“HCM_to_EBS_Interface_1_0028”
“FlowInstanceID”:
“300000038178667”
}
}
]

@amit.saroha

Please find the attached pipeline:

TestPipe_2022_05_24.slp (10.3 KB)

BR,
Spiro Taleski