Author |
Message
|
wmb_wps_soa |
Posted: Thu Feb 10, 2011 12:50 pm Post subject: Mapping Node in WMB 7.0.0.1 |
|
|
Acolyte
Joined: 19 Feb 2010 Posts: 65 Location: Detroit,Michigan,USA.
|
Guys,
Can the mapping node be used for 1 to many scenario where I have source as message and target1 is database , target2 is message (to compute).
Infocenter says that 1 to many works where all the targets must be same (either database or message).
My requirement is to insert the data to DB2 database (DB2 9.7.2) and then passes some fields from the messgae to next node. But its not working, I am getting internal broker error.
Can anybody tell, will it work? If yes, how can it be done?
Thanks,
Jeba |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 10, 2011 1:09 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If the documentation says it can't be done, then it can't be done.
Are you sure that when you use the mapping node to do a DatabaseInsert, that you lose the message that came in?
Have you considered a FlowOrder node? |
|
Back to top |
|
 |
wmb_wps_soa |
Posted: Thu Feb 10, 2011 1:15 pm Post subject: |
|
|
Acolyte
Joined: 19 Feb 2010 Posts: 65 Location: Detroit,Michigan,USA.
|
Yes, using the floworder node will work.
But, I was wondering, why the mapping to many targets (database,message etc) will not work? If it really dont work, then is not a disadvantage of mapping node?
Mapping node should work with different targets i suppose.
Thanks
Jeba |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 10, 2011 1:25 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The advantage of the Mapping node is that it is easier to use than a Compute node.
It has it's advantages and it's limitations. If it's limitations don't fit your business case, fortunately there are many other built-in nodes that have enough similar function that you are not forced to write a user defined node.
For example, a Database node will allow you to create a mapping to a Database without altering the Input message.
 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 10, 2011 1:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wmb_wps_soa wrote: |
Mapping node should work with different targets i suppose. |
Raise an enhancement request with IBM. Enough people agree with you then it'll end up in WMBvn. Even if no-one agrees with you it could still end up in WMBvn.
IMHO it's not a disadvantage of the Mapping node more of a limitation; you can work round it easily enough. But then I've very little use for the Mapping node. I'd sooner blast out a few lines of ESQL (which can use multiple targets) than fiddle with the message map.
Other views equally valid there. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 10, 2011 1:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
If it's limitations don't fit your business case, fortunately there are many other built-in nodes that have enough similar function that you are not forced to write a user defined node. |
Many ways to skin this cat. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fatherjack |
Posted: Thu Feb 10, 2011 1:38 pm Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
mqjeff wrote: |
The advantage of the Mapping node is that it is easier to use than a Compute node. |
Please define 'easier'. Trying to get your selects and for loops in the right place and getting anything other than simple one-to-one mappings to work is a nightmare. Give me ESQL anytime. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 10, 2011 1:42 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fatherjack wrote: |
mqjeff wrote: |
The advantage of the Mapping node is that it is easier to use than a Compute node. |
Please define 'easier'. Trying to get your selects and for loops in the right place and getting anything other than simple one-to-one mappings to work is a nightmare. Give me ESQL anytime. |
"easier" == "you don't have to write any code".
Not *simpler*. Easier. point, click, drag, drop. |
|
Back to top |
|
 |
fatherjack |
Posted: Thu Feb 10, 2011 2:04 pm Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
mqjeff wrote: |
fatherjack wrote: |
mqjeff wrote: |
The advantage of the Mapping node is that it is easier to use than a Compute node. |
Please define 'easier'. Trying to get your selects and for loops in the right place and getting anything other than simple one-to-one mappings to work is a nightmare. Give me ESQL anytime. |
"easier" == "you don't have to write any code".
Not *simpler*. Easier. point, click, drag, drop. |
You've not convinced me. Trying to point, click, drag and drop dbselects and for statements in the map script pane of the mapping node is, as my namesake would say, a feckin' nightmare. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 10, 2011 2:56 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It requires that you only use one finger, instead of eight. |
|
Back to top |
|
 |
joebuckeye |
Posted: Fri Feb 11, 2011 7:29 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Vitor wrote: |
But then I've very little use for the Mapping node. I'd sooner blast out a few lines of ESQL (which can use multiple targets) than fiddle with the message map. |
 |
|
Back to top |
|
 |
|