I need to transform a XML file data into a flat file. 1st step I did is craeted XML table definition using XML metadata importer.
Then I have taken a XML input stage and sequential file stage and loaded columns from table definition to XML input.
what input I should give to XML input? I'm doing it on parallel job.
worth mentioning I'm new to Datastage and need a detailed steps.
Thanks
Xml file to Flat file
Moderators: chulett, rschirm, roy
Re: Xml file to Flat file
Seq-file ===> XML input stage ===> Seq-file
1) Seq file stage- reading each xml input record in a single colunm. pass this to next stage.
2) XML input stage --
Stage tab :
Transformations output : check Repetation element required and Replace NULL with emty values.
Input tab :
XML Source : provide input column name which contains xml record.
Coulnm Content : Check XML document
Output tab :
Transformations output : check Inherit stage properties.
Columns : Import metadata created from XSD or XML data file using XML metadata parser.
3) Seq -file - Your output. Check output you find the values as NULL for those columns whose respective tagnames were missing in input xml file.
1) Seq file stage- reading each xml input record in a single colunm. pass this to next stage.
2) XML input stage --
Stage tab :
Transformations output : check Repetation element required and Replace NULL with emty values.
Input tab :
XML Source : provide input column name which contains xml record.
Coulnm Content : Check XML document
Output tab :
Transformations output : check Inherit stage properties.
Columns : Import metadata created from XSD or XML data file using XML metadata parser.
3) Seq -file - Your output. Check output you find the values as NULL for those columns whose respective tagnames were missing in input xml file.
I did exactly that, and I had no difficulty getting it to work.chulett wrote:Follow Ernie's advice instead.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872