Author |
Message
|
ykthinker |
Posted: Fri Oct 30, 2009 7:02 am Post subject: Unexpected mapping node behavior on attributes |
|
|
Newbie
Joined: 30 Oct 2009 Posts: 2
|
Version: 6.1.0.2
My flow: MQInput --> Mapping Node --> MQOutput
Parser: XMLNSC
Source: <field1 att1="1" att2="2">123</field1>
Aiming Target: <field2>123</field2>
Actual result: <field2 attr1="1" att2="2">123</field2>
Scenario: Source and Target have totally different schema. No instruction has been put down for any attributes. They just get copied over unexpectedly.
Question: As seen above, the attributes from the source get mapped to the target even though the target schema don't have attributes in field2 element. Is there a setting I can adjust to not let this happen or it is a defect? Thanks a lot.
Just by the way that I have search through the forum and did find what I am looking for. |
|
Back to top |
|
 |
gs |
Posted: Mon Nov 02, 2009 6:35 am Post subject: |
|
|
 Master
Joined: 31 May 2007 Posts: 254 Location: Sweden
|
Actually, we've stumbled upon the exact same problem. You'd expect the mapping node to detect whether attributes are in the target schema. Can anyone from IBM comment on this?
Our workaround was to use the ESQL function fieldvalue() on every field where to skip the attributes. |
|
Back to top |
|
 |
ykthinker |
Posted: Mon Nov 02, 2009 12:06 pm Post subject: |
|
|
Newbie
Joined: 30 Oct 2009 Posts: 2
|
When I changed the parser to XMLNS, it start giving expected result. So it seems to be problems with XMLNSC. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 02, 2009 12:14 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Why would the mapping node arbitrarily throw away attributes, unless you specifically told it to? |
|
Back to top |
|
 |
kimbert |
Posted: Mon Nov 02, 2009 2:27 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I suspect that this is a defect in the Mapping node.
In ESQL, if you copy A to B, you get a full tree copy by default. That's what mqjeff was referring to.
In the Mapping node, it works a little differently because the user can clearly indicate what they want to map. The behaviour of the Mapping node when used with XMLNS is correct. It's behaviour with XMLNSC is not.
Please can you raise a PMR for this, and reference this thread as background info for whoever responds. |
|
Back to top |
|
 |
|