cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic File Writer filename after XML Formatter possible?

Szymon
New Contributor II

Hello,

Is there a simple way, to pass filename to File Writer, after XML Formatter was executed?
In the Mapper:

  • filename shall be constructed into $filename. XML
  • JSON content for saving als XML shall be constructed into $content
    XML Formatter makes an XML out of JSON $content
    File Writer writes XML $content a file into $filename.

Can SL do such a sophisticated task?
I know that CSV Formatter e.g. can pass variables via header, but XML?

image

thank you & kind regards
Simon

5 REPLIES 5

Szymon
New Contributor II

Hi,

This is what i came up with, without using some silly things like child pipelines passing filename as parameter. Splitting the execution, writing a file to some
painintheneck.xml
join paths and moving the file to the appropriate filename.
Extremely annoying, so please if anyone has a shorter solution, post it here please.

image

kind regards
Simon

Siva_Venna
Contributor

hope this will help you. configure the pipeline as in the image, in pipeline execute snap define the parameter name and capture it’s value from the mapper and declare the same parameter name in the child pipeline too and reference it in file writer snap.
image

Szymon
New Contributor II

Hi, as previously stated, I would like to avoid child pipelines, just because SL is not capable of doing that. Thank you though for your input.

kind regards
Simon

Karthika
New Contributor II

SL does support child pipelines though, right?