Page 1 of 1

XML data import into a flat file

Posted: Tue Sep 20, 2005 1:31 pm
by davepro
Since there are no examples listed, the documentation is pretty sparse for xml, and the controls vague I'm wondering if anyone has any sort of documentation how to put together a step by step 'how to' for a job that reads an xml document, parses it and moves it to a sequential file.

I've already transferred the xml doc to the Unix server, loaded the table defintions from the xml tool by reading the file, created an XML Input stage, an XML Transformer stage, and a Sequential file stage (the target). The problem is that I can't configure any of these GUI controls to point to the actual XML data file sitting on the Unix box as there is no 'Input File Browser' like there is in Sequential file stages.

I've tried loading the path into Transformer Job, Input tab, XML Source column field, and checked the XML document tab on the same screen but no go. I've also seen a post in September from a user with the same problem but no help was posted.

Has anyone done this? Can you send me screen prints to davepro_99@yahoo.com if you can't spell it out in detail. Also any place an enhancement to this site can be logged to allow attachment uploads for screenprints?[img][/img]

Posted: Tue Sep 20, 2005 1:57 pm
by adarsh shrinagesh
Hi

There is a pdf file by the name of ENU-XMLPack.pdf that spells out how the XML stages are used(XMLPACK_20_Designer.pdf for the XML Pack stages).

For the task at hand try using a
Folder stage -> transformer/xml transformer -> Sequential File

Also import the metadata definition thru the manager->import->XML file definitions - the repeating element or the key is imp to focus upon

Use this definition in ur column definitions for the target.

thnx

Re: XML data import into a flat file

Posted: Tue Sep 20, 2005 2:19 pm
by chulett
davepro wrote:Also any place an enhancement to this site can be logged to allow attachment uploads for screenprints?
Do an Exact Match search for 'Imageshack' in this forum, you'll find instructions on how you can include a picture of your job in a post. :wink:

Re: XML data import into a flat file

Posted: Tue Sep 20, 2005 2:34 pm
by adhrijaa
chulett wrote:
davepro wrote:Also any place an enhancement to this site can be logged to allow attachment uploads for screenprints?
Do an Exact Match search for 'Imageshack' in this forum, you'll find instructions on how you can include a picture of your job in a post. :wink:

Hi,

We cant mention the .XML file name as in Sequential file stage when using XML stages. Please use a Folder stage to mentioned the path of the .XML files.

Apart from this mentioning a column as key column in XML stage have
lot of impacts on the output files. Take care of this too.

Regards,
Sengwa

Posted: Tue Sep 20, 2005 6:36 pm
by aartlett
Dave,
I'm putting on my heretic hat and going to suggest that you don't use datastage (ducking and weaving, dodging pitchforks).

I have been in this situation before and went with a XSL extraction running from script under Unix. I used some tools from Apache project, they were GPL and originally provided by IBM.

There are many XSL extractor tools to convert a XML file to a delimited or fixed format ASCII file. This approach was faster, easier to maintain and less intensive on the UNIX box.

Please remember: not all ETL is datastage, and not all Datastage is PX. The best tool on the right platform can work wonders.

I'm not trying to put down the XML transformer, I find it great in the right place, but I found it clumsy to use.

<finished ducking>

Posted: Tue Sep 20, 2005 10:21 pm
by vmcburney
Agree, DataStage server and enterprise jobs using the XML Input stage do not handle large XML files very well. DataStage TX is more effective with XML. You will find performance is much much faster if you can process it as a text file rather then XML and you wont hit a memory limit when the stage tries to import and validate the entire XML document as a single transaction.