ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB9: Mapping Node , DBSelect Combining Multiple Rows

Post new topic  Reply to topic
 IIB9: Mapping Node , DBSelect Combining Multiple Rows « View previous topic :: View next topic » 
Author Message
akil
PostPosted: Tue Nov 11, 2014 12:33 am    Post subject: IIB9: Mapping Node , DBSelect Combining Multiple Rows Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

Hi

I have a mapping node that takes an input assembly and a database select, and needs to create one single output assembly/message.

the database select returns two rows, and i need to map the one row to element one and the other row to element two of the output assembly.

Code:

select contact_type, contact, customer_id from contacts


sample result set

Code:

contact_type | contact | customer_id
phone , 111 , 'C1'
email , hi@me.com, 'C2'


the output message needs to look like the following

Code:

<contact>
  <email>hi@me.com</email>
  <phone>111</phone>
</contact>

_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
akil
PostPosted: Tue Nov 11, 2014 1:50 am    Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 338
Location: Mumbai

I used a customXpath to do this

Code:

fn:contact($contact[1],$contact[2])


It would be good to be able to do a self-join instead of an XPath and retrieve just a single row..
_________________
Regards
Back to top
View user's profile Send private message Visit poster's website
martinb
PostPosted: Fri Nov 14, 2014 1:10 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Hi

Self Join can be done, simply wire the repeating input to the target, and then drag another wiring from the same repeating input and drop it on the transform, making it a primary input, and you have a self Join.

Then set a join condition.. Looking at your sample data, it would have made more sense to me if in the resultset rows you showed being joined "customer_id" was matching. Then you could have used "customer_id" as the Join match condition.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB9: Mapping Node , DBSelect Combining Multiple Rows
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.