XML Output Stage File Name Split
Moderators: chulett, rschirm, roy
XML Output Stage File Name Split
Does anyone know if it's possible when outputting xml to a file to control what the file name is going to be when you split it? All my tests show that it just starts appending 1...99 to whatever root name I give it.
OK, found what I was thinking. Check the XML Pack Guide pdf and the Writing output to your file system section of Chapter 4. You'll see mention of these 'column index flags' there:
%% Column position, starting with zero (0)
%@ Column names
The latter may help you.
%% Column position, starting with zero (0)
%@ Column names
The latter may help you.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I've also played games with using a Server Job and sending the split xml content downstream as individual rows to a folder stage. Been awhile, so I don't remember how flexible it is, but the folder stage has a few ways to create multiple files also.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
...and if you are reading this and using 9.1, the Sequential Stage introduced an ability to write to multiple files based on a break of some kind, similar to the trigger in the xmlOutput Stage, so you could send you content on each row and then use a Sequential Target (in 9.1 and above).
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
I think going from the XML Output to a Folder stage is probably the right track. I read too the documentation mentioning the use of %% and %@. When I connected a folder stage I started getting mapping errors on my job. I'm probably not using the Folder Stage correctly. Because the input on the XML is all my tags but what should the output columns on the XML stage be? wouldn't it just be one column that would be the data stream that becomes a file?
If I try and use the %% or %@ on the XML stage without an output throws an error and that is why I think I need to output the XML to the folder stage.
If I try and use the %% or %@ on the XML stage without an output throws an error and that is why I think I need to output the XML to the folder stage.
On the output link of your xmlOutput Stage have just one single column....make it a longvarchar with a length of (say) 99999 and put a single "/" in the Description property. That will send your entire manufactured xml content downstream in a single column on a single row (assuming you choose the aggregate option for the Stage).
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>