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.