Datastage 8.0 XML Input Stage Usage - Need Clarification
Moderators: chulett, rschirm, roy
Datastage 8.0 XML Input Stage Usage - Need Clarification
Hi
We are trying to create one parallel job where we will read one XML file as input into a XML input stage for further processing.
In Datastage 8.0 version we do not have any Folder Stage option.
So the trick which we have used is,we first used one sequential file stage where we read that entire XML file "test.xml" as a stream input into one single column "XML Record" of that sequential file with Record Type as implicit and Field Delimiter as none in Format page.
Then we have fed this column into XML Input Stage.
But the problem which we are facing is if the "test.xml" file size is huge (say more than 500 bytes) the input xml data is getting truncated into two rows in the sequential file and hence we are not able to feed those data into XML Input Stage.
Can any body explain how to use the sequential file stage to read xml file as input into XML Input Stage?
Is there any limitation while using this trick for XML Input Stage?
We are trying to create one parallel job where we will read one XML file as input into a XML input stage for further processing.
In Datastage 8.0 version we do not have any Folder Stage option.
So the trick which we have used is,we first used one sequential file stage where we read that entire XML file "test.xml" as a stream input into one single column "XML Record" of that sequential file with Record Type as implicit and Field Delimiter as none in Format page.
Then we have fed this column into XML Input Stage.
But the problem which we are facing is if the "test.xml" file size is huge (say more than 500 bytes) the input xml data is getting truncated into two rows in the sequential file and hence we are not able to feed those data into XML Input Stage.
Can any body explain how to use the sequential file stage to read xml file as input into XML Input Stage?
Is there any limitation while using this trick for XML Input Stage?
Hi
Hi
I have tried to use External Source stage. There in Properties tab I used Source Method as Program Files and Source XML File as "test.xml" with path.
Then in Format tab Record Type implicit and inside Field Defaults Delimiter as none.
But in Column tab what column shall I use,
Columns same as the XML file or any single column to read data as stream input from the XML?
I tried but when I am trying to View Data of XML it is unable to show me that.
Can you plz specify how to configure the External Source stage in this scenario?
I have tried to use External Source stage. There in Properties tab I used Source Method as Program Files and Source XML File as "test.xml" with path.
Then in Format tab Record Type implicit and inside Field Defaults Delimiter as none.
But in Column tab what column shall I use,
Columns same as the XML file or any single column to read data as stream input from the XML?
I tried but when I am trying to View Data of XML it is unable to show me that.
Can you plz specify how to configure the External Source stage in this scenario?
Hi
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
The External Source stage WILL work. Go to Ernie's blog and search for it.
http://dsrealtime.wordpress.com/category/xml/
http://dsrealtime.wordpress.com/category/xml/
The syntax for list ("ls") will be the same, since EE has a unix command layer under the surface, and C: is left out of the fully qualified string in my job [what to do for D: is an interesting question --- anyone know?]. This is what I use in my windows version of a job that does this:
ls #xmlsubDirectory#*.xml | sort
Where the job parameter is set to
/dir1/dir2/dir3/myXMLdocuments/
Ernie
...btw...folder is in v8....but it's not an EE Stage, just a Server side stage.
ls #xmlsubDirectory#*.xml | sort
Where the job parameter is set to
/dir1/dir2/dir3/myXMLdocuments/
Ernie
...btw...folder is in v8....but it's not an EE Stage, just a Server side stage.
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>
Hi
I have tried with External Source stage.
There it is able to read the input xml file and feeding it to the XML Input stage.
Then in the XML Input stage in Input tab I have selected XML source column as the column from External Source stage and Column Content as URL/File Path.
But the point is how shall I map this to the Output of the XML Input stage to get the data?
Thanks in advance.
I have tried with External Source stage.
There it is able to read the input xml file and feeding it to the XML Input stage.
Then in the XML Input stage in Input tab I have selected XML source column as the column from External Source stage and Column Content as URL/File Path.
But the point is how shall I map this to the Output of the XML Input stage to get the data?
Thanks in advance.
Hi
Same way as you would with the Input XML stage using the Folder in Server - map using xpaths declared in the description field of the table definition.santanu84 wrote:But the point is how shall I map this to the Output of the XML Input stage to get the data?
All detailed in the XMLPACK guide in the DataStage docs.
Regards,
S
Edit: ps. I'm too slow!
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's all in the thread. Start a new thread and outline what issues you are having.
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>