XML data import into a flat file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
davepro
Participant
Posts: 1
Joined: Wed Aug 10, 2005 11:46 am

XML data import into a flat file

Post 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]
adarsh shrinagesh
Premium Member
Premium Member
Posts: 68
Joined: Sat Feb 05, 2005 4:59 am
Location: India

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: XML data import into a flat file

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
adhrijaa
Participant
Posts: 3
Joined: Tue Sep 20, 2005 1:57 pm

Re: XML data import into a flat file

Post 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
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post 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>
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post 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.
Post Reply