|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Read from Multiple Tables/Rows using DatabaseInput Node |
« View previous topic :: View next topic » |
Author |
Message
|
whydieanut |
Posted: Wed Sep 26, 2012 1:42 am Post subject: Read from Multiple Tables/Rows using DatabaseInput Node |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
Hi all,
I am trying to use the DatabaseInput Node to read data from a source system.
Now there are 2 ways the data from the DB might have to be handled in.
1. Multiple rows of data from a single table might constitute a single Input Message.
2. Multiple rows of data from multiple tables (join) might constitute a single Input Message.
Is there a way that the DatabaseInput Node can be configured to create a single input message for any of the above 2 scenarios?
As for option 1, each row inserted into the Application Table would trigger a single message to be created and sent to the flow. Is using Aggregation an option?
And for option 2, I noticed that the DatabaseInput Node only allows you to select a single Application Table in the configuration screen.
Or is the only option to have a separate Compute/Database node retrieve the complete set of data/rows needed to create a single message.
Please let me know if I am not being clear in my description. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Sep 26, 2012 5:12 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
whydieanut |
Posted: Thu Sep 27, 2012 9:51 pm Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
@lancelotlinc,
I've gone through that and got a basic flow running, which reacts to a single row of data from a single table.
But for the actual scenario, I have to extract data from multiple rows from a single table OR multiple rows from multiple tables to create a single input message (Don't have enough clarity YET on how records are maintained in the source system's DB).
I got option 2 working.
I have 2 tables holding data for a single record/transaction.
Table 1 holds the header data (1 row per record) and Table 2 holds the repeating line item level data.
I set my trigger on Table 1.
So each row in this table generates a single message. In my flow I have a Compute node that selects data from Table 2 using the Primary key from the input message (data from Table 1).
Supposing the data is actually stored in the way mentioned in option 1, is there a way to combine multipe rows of data from a single table into a single message, given that each record/message can be made up of a varying number of DB rows, grouped together only by a primary key column? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Sep 28, 2012 5:09 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
whydieanut wrote: |
Supposing the data is actually stored in the way mentioned in option 1, is there a way to combine multipe rows of data from a single table into a single message, given that each record/message can be made up of a varying number of DB rows, grouped together only by a primary key column? |
Yes, most database administrators call this a 'view'. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 28, 2012 5:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
whydieanut wrote: |
Supposing the data is actually stored in the way mentioned in option 1, is there a way to combine multipe rows of data from a single table into a single message, given that each record/message can be made up of a varying number of DB rows, grouped together only by a primary key column? |
Yes, most database administrators call this a 'view'. |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|