I have a XML file whose content I am trying to load into a table,I am not sure how to pull data from this XML file because I am not able to understand the metadata behind this XML.
I tried to Import this XML file into Import table defination section,XML as source and build a metadata which is then used in the XML imput stage.
Still,there are some issues with the design and Value coloumn is blank at all the places.I have pasted a sample XML file for the reference..
Anyone could please suggest me the way to read all data within the XML.
=================================================
<dumps Patcher="http://hoverif.comer:29081/d3p">
<dump time="Tue Mar 09 10:32:27 CST 2010">
<scom name="com.sepr:type=Metrics,service=monitorService">
<attributes>
<attribute name="Failed">
<value>
dd
</value>
</attribute>
<attribute name="Successful">
<value>
e0
</value>
</attribute>
<attribute name="Consolidated">
<value>
<composite>
<attribute name ="LastRes">
<value>
1084
</value>
</attribute>
<attribute name ="LastResponseUpdate">
<value>
Tue Mar 09 10:24:34 CST 2010
</value>
</attribute>
</composite>
</value>
</attribute>
<attribute name="Operational">
<value>
Available
</value>
</attribute>
<attribute name="NumberOfSuccessful">
<value>
0
</value>
</attribute>
<attribute name="LastResponse">
<value>
1084
</value>
</attribute>
<attribute name="TimeInThread">
<value>
10
</value>
</attribute>
<attribute name="ThreadQueueLength">
<value>
10
</value>
</attribute>
<attribute name="Health">
<value>
NotApplicable
</value>
</attribute>
</attributes>
</scom>
</dump>
</dumps>
=================================================
Parsing XML file
Moderators: chulett, rschirm, roy
unfortunately no-one knows about that xsd of that XML file,this is an auto generated thing.this is the Metadata which I am using in the XML xformer stage.
Patcher VarChar(60) /dumps/@Patcher
Time VarChar(30) /dumps/dump/@time
scomname VarChar(80) /dumps/dump/scom/@name
name VarChar(50) /dumps/dump/scom/attributes/attribute/@name
Value Decimal(15) /dumps/dump/scom/attributes/attribute/@value
When I use this meta data and run the job,all colums get loaded properly but Value field is Blank..
I am sure about all other thing which is good in the job,but I am not sure about the metadata,Is there something wrong in the metadata ?
Patcher VarChar(60) /dumps/@Patcher
Time VarChar(30) /dumps/dump/@time
scomname VarChar(80) /dumps/dump/scom/@name
name VarChar(50) /dumps/dump/scom/attributes/attribute/@name
Value Decimal(15) /dumps/dump/scom/attributes/attribute/@value
When I use this meta data and run the job,all colums get loaded properly but Value field is Blank..
I am sure about all other thing which is good in the job,but I am not sure about the metadata,Is there something wrong in the metadata ?
Code: Select all
Value Decimal(15) /dumps/dump/scom/attributes/attribute/value/text()
You are the creator of your destiny - Swami Vivekananda