Posted: Tue Jun 19, 2007 8:41 am Post subject: Data Insert Node, Name Value Pairs
Novice
Joined: 03 Jul 2002 Posts: 20 Location: London
We have a requirement to upload data from an XML formatted message to an Oracle database and am trying to use the compute node, this works well for simple 1 to 1 mappings but am having some trouble with some "name-value pairs" i.e.
If the name of the client specific pair is "UserID" the name, and the value need to end up in a database field called UserID
If the name of the client specif pair is "OriginalQuery" the name and the value need to end up in a database field called Query.
Note that there is other XML outside of the client specific pairs and that this is just one of many records i.e.
<xml>
<record 1>
<Field 1> Test field 1a</Field 1>
<ClientSpecificPairs>
<ClientSpecificPair name="UserID" value="bob"/>
<ClientSpecificPair name="OriginalQuery" value="blackadder"/>
</ClientSpecificPairs>
<Field 2> Test field 1b</Field 2>
</record 1>
<record 2>
<Field 1> Test field 2a</Field 1>
<ClientSpecificPairs>
<ClientSpecificPair name="UserID" value="edmund"/>
<ClientSpecificPair name="OriginalQuery" value="blackadder"/>
</ClientSpecificPairs>
<Field 2> Test field 2b</Field 2>
</record 2>
e.t.c.
</xml>
Is this possible using the DataInsert Node or does the mapping need to be done using a compute node and some ESQL instead (my original preference was to keep things simple and use the node appropriate to the task but I'm beginning to have my doubts)?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum