cancel
Showing results for 
Search instead for 
Did you mean: 

Need to cover few scenarios in pipeline

Sahil
Contributor

Hi,
I have a multiple scenario to cover in a pipeline.
1)read an xml, validate the xml , send mail mentioning xml file name that it is not valid.
2)create lookup out of csv file which will have number, name, s1.
3)if xml is valid, check if <V_number> exists in lkp(number).
if yes, then transform the xml and name the output file with <V_number>_lkp(name)_timestamp.
4)if <V_number> does not exists in lkp(number) stop the execution and send mail mentioning xml file name.

I am able to transform the xml. My current pipeline looks like below:-
image

10 REPLIES 10

Hi @Supratim ,
And XML formatter after Mapper1 is not allowing file name to pass.
How to name the output file in file writer.

Supratim
Contributor III
  1. As i am not sure about your data set, might creating confusion. Try this option- For join - first inter change input0 (38) to input 1(csv parse ) and use left outer / outer join ,also uncheck unmatch error view option. Then can use router to determine you found the correct lookup data or not. If found then save in file else send mail.
  2. For file name , creat a child pipeline with xml parser and file write (also remove these from parent)Add one pipeline param (filename ) in child pipeline and use that in file write. Call this child pipeline using pipeline execute.

Thanks,
Supratim
(+91)923-263-3466

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Hi @Supratim ,
I will try it, How to validate input xml after reading it at the starting and sending a mail if it is invalid.

Supratim
Contributor III

using xsd in xml parser snap can validate your input xml. Make sure to open error view of xml parser to capture error message.

Thanks,
Supratim
(+91)923-263-3466

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Hi @Supratim ,
For child pipeline, it is showing error:-
Failure: Snap is not connected to any upstream source, Reason: Snap failed unexpectedly and did not provide any reason

image