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

Format to XML in an Ultra Pipeline?

dcarlson
New Contributor

Has anyone been able to format multiple input fields into XML in a pipeline that will be executed via an Ultra task?

image

I attached a screenshot of my pipeline.
In the highlighted XML Format snap, if I clear the Root Element field (as required by the instructions for building an Ultra pipeline), I get an error when it runs; it appears it needs a root element in which to place my many input fields. However, when I add a Root Element of โ€œDocumentRootโ€ to that snapโ€ฆ the pipeline fails when run by Ultra.

I conclude that we cannot format multiple inputs into XML when run via Ultraโ€ฆ but Iโ€™m hoping there is some other way to accomplish my goal.

My overall need isโ€ฆ I capture whatever (it can vary alot) JSON elements are input to me, store them in an XML field in our SQL Server database, to be retrieved/parsed later.

Thanks in advance - David.

3 REPLIES 3

tstack
Former Employee

By โ€˜multiple inputsโ€™, do you mean there are multiple input documents that you want to combine into a single XML document? In other words, the two SQL snaps to the left the XML Formatter are generating multiple output documents and you want to merge those into a single XML doc? If so, you are correct that that is not directly supported in the top-level ultra pipeline. Instead, youโ€™ll need to put those snaps in a child pipeline and use PipelineExecute to do a local execution of the child. So, the child will execute the SQL queries and then generate the XML doc that is the response.

dcarlson
New Contributor

T, thanks for responding!

No, not separate documents input. Just multiple fields.
Here is a screenshot of my input JSONโ€ฆ
image
โ€ฆ an here is my errored XML Format snap.
image

โ€œIncidentDescriptionโ€ is my second field on the input side. โ˜น๏ธ

Haโ€ฆ I figured it out.
The error said to verify that the document is XML convertibleโ€ฆ so I played around with my mapping in the preceding Mapper snap.
I added a common root to call of my fieldsโ€ฆ โ€œ1.โ€โ€ฆ and that satisfied the XML Formatter snap.
image
image

Its always simple once you know what to do. ๐Ÿ˜‰ Regards - David.