Author |
Message
|
Cogito-Ergo-Sum |
Posted: Wed Feb 01, 2012 9:08 pm Post subject: MB8 Mapping node : Including, omitting headers. |
|
|
 Master
Joined: 07 Feb 2006 Posts: 293 Location: Bengaluru, India
|
How do I add or remove headers to or from messages in Mapping node ?
For wonders' sake, I set input message as the response from Google Geocode API and target as a CSV record - via a message set - in the Mapping node. I wired the Out terminal to a message queue. This message queue does get the CSV but, it is prefixed by the HTTP headers too. To remove this, I added the HTTPResponse header in the target pane; but didn't map it from the input message. That eliminated the HTTP headers from the message.
For more wonders' sake, I wanted to publish the CSV to a publication topic. For this I wired the output terminal of Mapping node to a Publication node. The publication wouldn't happen because I hadn't added the MQRFH2 header. So, I added the MQRFH2 header in the target pane and I think, I mapped the Format (or Encoding or CCSID or some such) from the input message. It worked.
So, to eliminate headers, add the header in the target pane of the Mapping node, but do not map it. To add a header, add it in the target pane and map it. BTW, in the first case mentioned above, the HTTP headers weren't seen when I used a FileOutput node instead of message queue.
Am I doing this right ? Or, am I missing something ? _________________ ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Feb 02, 2012 6:45 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
For what it's worth, in my experience, anything more than a simple one-to-one map needs a compute node. IMHO, the mapping nodes are not yet mature enough to be utilitarian. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 02, 2012 7:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
For what it's worth, in my experience, anything more than a simple one-to-one map needs a compute node. IMHO, the mapping nodes are not yet mature enough to be utilitarian. |
OTOH, I don't think you've played with the v8 mapper. Which is new and shiny. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Feb 02, 2012 7:47 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff wrote: |
lancelotlinc wrote: |
For what it's worth, in my experience, anything more than a simple one-to-one map needs a compute node. IMHO, the mapping nodes are not yet mature enough to be utilitarian. |
OTOH, I don't think you've played with the v8 mapper. Which is new and shiny. |
True, I am excited by the new direction WMB v8 has taken. I hope to get some seat time soon. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 07, 2012 2:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
mqjeff wrote: |
lancelotlinc wrote: |
For what it's worth, in my experience, anything more than a simple one-to-one map needs a compute node. IMHO, the mapping nodes are not yet mature enough to be utilitarian. |
OTOH, I don't think you've played with the v8 mapper. Which is new and shiny. |
True, I am excited by the new direction WMB v8 has taken. I hope to get some seat time soon. |
Then comment on WMBv8's new features after that, not before.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sovee |
Posted: Tue Aug 07, 2012 1:26 pm Post subject: |
|
|
Novice
Joined: 23 Jul 2012 Posts: 12
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 17, 2012 1:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
kimbert |
Posted: Tue Aug 21, 2012 12:11 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
IMHO, the mapping nodes are not yet mature enough to be utilitarian. |
I strongly advise you, and anybody else who has not yet tried out the v8 mapper, to give it a try at the earliest opportunity. |
|
Back to top |
|
 |
nathanw |
Posted: Wed Aug 22, 2012 12:45 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
having just spent 6 months using mapping nodes on a project in V7 I have to say my respect (not quite the right word but I cannot think of it at the moment) for the mapping nodes has gone up
I had not used them a great deal and to be honest given the choice I would prefer to use ESQL but I do like certain aspects of the mapping nodes
in response to OP yes that is one way of doing it _________________ Who is General Failure and why is he reading my hard drive?
Artificial Intelligence stands no chance against Natural Stupidity.
Only the User Trace Speaks The Truth  |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 22, 2012 2:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nathanw wrote: |
having just spent 6 months using mapping nodes on a project in V7 I have to say my respect (not quite the right word but I cannot think of it at the moment) for the mapping nodes has gone up
I had not used them a great deal and to be honest given the choice I would prefer to use ESQL but I do like certain aspects of the mapping nodes |
Wait until you see the v8 mapping node. Way cool.
(Never replace ESQL obviously, but way cool) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Aug 22, 2012 4:06 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
(Never replace ESQL obviously, but way cool) |
The new mapping node is capable of things that were impossible or impractical or too slow using the old mapping node. So in v8, the mapping node will be used for tasks where ESQL would have been used in v7.
But that's not the same as 'replacing ESQL', so your point stands. ESQL is here to stay, and remains an excellent choice for many tasks. |
|
Back to top |
|
 |
|