BPM getting data from multiple JDBC databases

Hi - a 'high level' question...
I have a scenario where the first step in my bpm is a receive step which will be a JDBC send adapter/comm channel to a particular database.  The rows returned will have a key field called "ID".  For each of these rows, I need to go to a completely different JDBC database to gather more data based on this key "ID".
Not sure how to go about this, but this is my best guess
1) receive step, asynchronous which will be used by the jdbc send adapter
2) create a block, mode ForEach referring to the messages returned in the initial receive step.  In this block there will be:
3)THIS IS THE PART I'M CONFUSED ON - do i need a synchronous send step, with the request message being the message from the initial receive and a response message being the message from the JDBC recieve adapter?  How does the "ID" get passed in to select the proper record? How is a SQL created to get the proper record from the second database?
4 etc) After that, it would be a straight forward transform and send to the target system...which i'm ok with.
Again, my confusion is how the key field is somehow passed to the second JDBC call.
any assistance or clarification would be greatly appreciated!  thanks /dave

HI,
<i>For each of these rows, I need to go to a completely different JDBC database to gather more data based on this key "ID"</i>
>>>To gather more data, means you are going to select the data for each key ID. Then this data you need to send to target system right ? If so, you need to have Synchronous Send from BPM.
Your BPM steps will be like this
1) Receive the message from Database(JDBC sender)
2) Block with Foreach
3) Send the data Synchrnously to the other database with the help of Reciever JDBC adapter
4) Receive the Response, and Send this Asynchrnoulsy to the Target System.
DO you need Foreach loop here , i am just thinking ? You can pass multplr Key Values to the JDBC Receiver structure and get the Response at a time.
For more on JDBC Sync-
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
Regards,
Moorthy

Similar Messages

  • Jdbc getting data from multiple tables

    hi guys
    how can i get data from multiple tables in MSAccess
    please help

    >
    here is code thata i want to do
    i have 3 tables in my MSAccess databace
    Stud_O which consist name,surname fields
    Stud_I consist address,tel
    Stud_E department,faculty fields
    Based on this I would guess that you are missing a key field. There is no way to connect the tables.
    I make the class to insert data to the tables. But
    cant do getting datas from this tables.
    can anybody help me in making query
    and method that displays reultset strings to the
    textBoxes
    A select ...
    select name,surname from Stud_O. Use the executeQuery() method.

  • Anyone knows about using java to get data from MS Access database.

    hi there
    anyone knows about using java to get data from MS Access database? thank you

    there is a list of jdbc drivers at:
    http://industry.java.sun.com/products/jdbc/drivers
    they have several ms access drivers listed.
    also, you can use a jdbc-odbc bridge which allows you to use jdbc to connect to any odbc data source:
    http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html

  • Fastest way to get data from Multiple lists across multiple site collections

    HI
    I need to get data from multiple lists which spread across 20 site collections and need to show it as list view.
    I have searched on internet about this and got some info like options would be to use search core APIs or BCS . I can't use search because I want real time data. Not sure of any other ways.
    if anybody can provide ideas it would be help.

    Might LINQ be an option for you?  Using
    LINQPad and the
    SharePoint Connector, you should be able to write a query that'll retrieve this data, from which you can tabulate it.  I'm not sure how you'd be able to automate this any further so that it's then imported in as list.
    For something more specific, I used a third party tool called the
    Lightning Tools Lightning Conductor, which is essence a powerful content roll-up tool.  In one of my solutions, I created a calculated column that gave an order / ranking on each item, so that when lists were combined, they'd still have some form of
    order.  The web part is also fairly customisable and has always proven a useful tool.
    Hope that helps.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Best way to get data from multiple table

    hi
    i would like to know which is the best way of getting the data in the final table from multiple read statements which are inside loop.
    for exm
    loop at itab.
    read ....
    read....
    read....
    read ....
    data into final_itab
    endloop.
    thanx
    manoj

    Hi.....
    Say we are having two data base tables.. ZMODEL1 and ZMODEL2...
    Now decalre intrenal tables and work areas and before that structures for these two and also declare one final output table for display the data...
    >types: begin of ty_model1,
    >       za(10),
    >       zb type netwr,
    >       zc(10),
    >       zd(10),
    >       ze(10),
    >       zf(10),
    >       end of ty_model1,
    >       begin of ty_model2,
    >       za1(10),
    >       zb1(10),
    >       zc1(10),
    >       zd1(10),
    >       za(10),
    >       end of ty_model2,
    >       begin of ty_output,
    >       za(10),
    >       zb type netwr,
    >       zc(10),
    >       zd(10),
    >       ze(10),
    >       zf(10),
    >       za1(10),
    >       zb1(10),
    >       zc1(10),
    >       zd1(10),
    >       end of ty_output.
    >
    >data: t_model1 type standard table of ty_model1 initial size 0,
    >      t_model2 type standard table of ty_model2 initial size 0,
    >      t_output type standard table of ty_output initial size 0,
    >      w_model1 type ty_model1,
    >      w_model2 type ty_model2,
    >      w_output type ty_output.
    Now in the start of selection.. event...
    >select <field names in the same order as in database table> from zmodel1 into table t_model1 where za in s_comp. (s_comp is select-option for that field)>
    >if sy-subrc = 0.
    >select <field names in the same order as in database table> from zmodel2 into table t_model2 for all entries in t_model1 where za = >t_model1-za.
    >endif.
    After that now fill the final output table...
    >loop at t_model1 into w_model1.
    >  w_output-za = w_model1-za.
    >  w_output-zb = w_model1-zb.
    >  w_output-zc = w_model1-zc.
    >  w_output-zd = w_model1-zd.
    >  w_output-ze = w_model1-ze.
    >  w_output-zf = w_model1-zf.
    >
    >read table t_model2 into w_model2 with key za = w_model1-za.
    >if sy-subrc = 0.
    >  w_output-za1 = w_model2-za1.
    >  w_output-zb1 = w_model2-zb1.
    >  w_output-zc1 = w_model2-zc1.
    >  w_output-zd1 = w_model2-zd1.
    >endif.
    > append w_output to t_output.
    > clear w_output.
    > end loop.
    and now display the final out table...
    This is the best way..
    Thanks,
    Naveen.I

  • How to get data from multiple tables

    Hello Everyone,
    I need to read data from a few tables (VBAK, VBAP, VBUK, VBUP etc.) because I'd like to get all open Sales Orders. I've tried to use RFC_READ_TABLE but it looks like it can read only 1 table at a time. I've tried to read data from individual table and then join them but it didn't work out very well because I got about 1.5 millions records from just the VBUP table. So anyone knows if there is any function that I can use to join those tables and just get the records I need?
    Any help would be highly appreciated.

    Hi Nhan,
    Thank you for your reply.
    Do I have to be a SAP developer to create BAPI on SAP? What kind of access rights do I need?
    I've tired to use other BAPIs such as BAPI_SalesOrder_GetList and it doesn't work for me because I don't have all customer numbers and I need to get all un-shipped orders for all customers.
    I've read a post on the internet brieftly menitoned that we can create a table to store information about the tables we want to join and then call the RFC_READ_TABLE function. Do you know if that is possible?
    Is there any other way you can think of?

  • Need to get data from multiple database instances in a single query

    Hi,
    I need a small favour from you guys. The prob is as follows:
    I need to get name, row_id from table A from schema 1 and gbu_name, name from table B from schema 2 where a.name = b.name. I wrote the query in the following manner:
    SELECT a.name, a.row_id, b.gbu_name
    FROM Schema1.A as a, Schema2.B as b
    Where a.name = b.name
    But this query is not working and the error is like " The table does not exists".
    Please update me how to avoid the error and get the right sort of result.
    Thanks & Regards,
    Debabrata

    Ah, youre actually asking different things.
    In your topic title, you say youre running separate instances
    In your body text, you say you are under different user/schema
    So tell me, do you have more than one database or not? How many entries in your TNS file?
    I would say, for "multiple database instances"
    SELECT
      a.id, b.id
    FROM
      tableA a
      INNER JOIN
      tableB@OTHER_DATABASE_LINK_NAME b  <--NOTE!
      USING(id)And of course you will have to look up CREATE PUBLIC DATABASE LINK sql..
    Message was edited by:
    charred

  • Getting data from multiple hard drives onto one drive

    So here's the problem: I have a Quicksilver 867 I want to upgrade, it came with no HD so I want a new one, I put my old strawberry imac's HD into it because I still have a use for all the programs on it (i.e. photoshop) and I wanted to take advantage of the QS' hardware (superdrive), also I know my department is getting rid of their old G4 and that computer has some programs I would rather see being used than being erased, so is there a way to copy all the information from those two drives onto a new drive and still have those programs working good? I've read about HD copying software but am still hazy on how it will handle individual programs? If I have to copy the whole drive, would there be a problem with multiple system folders being on the new HD? I don't have much experience with this sort of thing, so I hope I'm describing the situation well enough.
    I plan to buy Tiger and install it on the new HD and the old drives are running os 9.1 and 9.2 just to let you all know. If anyone can give me some advice I would be most grateful.
    thanks,
    nick

    Having multiple system folders on the same volume is a problem waiting to happen. The safest way to have trouble-free programs is to use the original installer CDs to load the software, so that all components (both visible and invisible) are written to their designated locations on the hard drive. Copying programs from another hard drive without ownership of the media is software piracy. If your employer doesn't use the programs on the soon-to-be discarded G4, why not ask if you can have or purchase the installer CDs?

  • Getting data from multiple XML Files

    Could any one please shed some light about the best way to
    read multiple external xml files through Flex? We haveabout 100
    different xml files (of which only few are randomly accessed by the
    users).
    I tried implementing the following generic function which
    takes a filename but when debugging it, it seems that the handler
    never gets call after executing the service.send() line! I will
    greatly appreciate your help!!!
    public function fetchFileContent(fileName:String):void{
    //this method is called upon clicking on a button
    var service:HTTPService = new HTTPService();
    service.url = "filePath/" + fileName ;
    service.useProxy = false;
    service.resultFormat = "e4x";
    service.addEventListener ("result",fileRetrievalHandler)
    service.send();
    public function fileRetrievalHandler(evnt:ResultEvent):void{
    fileContent = evnt.result.feed; //this line never gets
    executed

    "miglara" <[email protected]> wrote in
    message
    news:glhase$5sr$[email protected]..
    > Could any one please shed some light about the best way
    to read multiple
    > external xml files through Flex? We haveabout 100
    different xml files (of
    > which
    > only few are randomly accessed by the users).
    > I tried implementing the following generic function
    which takes a
    > filename
    > but when debugging it, it seems that the handler never
    gets call after
    > executing the service.send() line! I will greatly
    appreciate your help!!!
    >
    > public function fetchFileContent(fileName:String):void{
    //this method is
    > called upon clicking on a button
    > var service:HTTPService = new HTTPService();
    > service.url = "filePath/" + fileName ;
    > service.useProxy = false;
    > service.resultFormat = "e4x";
    > service.addEventListener ("result",fileRetrievalHandler)
    > service.send();
    > }
    >
    > public function
    fileRetrievalHandler(evnt:ResultEvent):void{
    > fileContent = evnt.result.feed; //this line never gets
    executed
    > }
    Try adding a fault handler and seeing if that fires. Also,
    since you're
    using HTTPService instead of URLLoader, be aware that this
    probably won't
    ever work from your development environment unless you've
    either changed the
    output directory to go to the server or you've changed some
    compiler flags
    to allow you to get local and network access at the same
    time. This is why
    I always use URLLoader to load in XML files at a relative
    path...it just
    works, without my needing to change anything.

  • Getting data from Multiple cDAQ racks at the same time.

    I need to combine an 8 port cDAQ rack and a 4 port cDAQ rack and was hoping someone can help.  I do not need the signals to be synced up exactly, but I can’t handle the 50ms delay that I have now.  The signals on the 2nd rack is more for customer reference and the 1st rack is doing all the real analyzing.
    I need to collect samples at 500hz or every 2ms and I collect 25 samples giving me a chunk of data every 50ms.  The DAQmx tasks seem to pull at the same time, therefore the cDAQ2 In chunk is always 1 scan behind causing a 50ms delay.
    Is there a better way to pull this data without having such a large delay?  I did not see anything in the examples that apply to my particular application and hardware.
    Thanks,
    Doug

    Each task will begin sampling data as soon as you start each task, so in order for each task to be synced, you want each start task to occur at as close to the same time as possible.  One way to try to do this is to put the start tasks together in a sequence structure.  This will ensure all your cofiguration steps for both tasks are complete before you start sampling.  How long are you runnig your application for?  If its not that long, I wouldn't worry about one of your chassis running faster than each other.  If you think that is becoming a problem, there are ways to diagnose that, but that would take a significant amount of effort.
    I have included a snippet of how you can try starting your tasks together
    Applications Engineer
    National Instruments
    Attachments:
    start tasks together.png ‏21 KB

  • Getting data from mysql!!  please could someone help me?

    Hello people!!
    I can't get data from a Mysql database through a jsp page, there's a error message of conversion,
    here's my classes:
    package teste;
    public class GetDB {
        String str;
        Connection con;
        ObjectPage ob;
        public GetDB()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception("Banco de dados n�o encontrado" +
                    ex.getMessage());
        public ObjectPage getOb(){
            try {
                String selectStatement = "select * from teste";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while (rs.next()) {
                   str = rs.getString(1)+" "+rs.getInt(2);
                prepStmt.close();
                ob = new ObjectPage(str);
            }catch (SQLException ex) {           
            return ob;
        public void setOb(ObjectPage ob){
            this.ob = ob;
    }    and this:
    package teste;
    public class ObjectPage {
       String name;
       public ObjectPage(String nome) {
           name = nome;
       public String getName(){
           return name;
    }and this is myjsp page:
    <jsp:useBean id="dado" class="teste.GetDB" scope="page" >
      <jsp:setProperty name="dado" property="ob" value="{$name}"/>
    </jsp:useBean>
    <%--<jsp:getProperty name="dado" property="propName"/> --%>
    <p><b><h1><font color="orange">${dado.ob.name}</font></h1></b></p>so what's wrong? could you give me some tips? what should i do ?
    Thanks a lot!!!

    If there's an error message of conversion, are you sure that the 1st and 2nd columns returned in the result set are of type string & integer respectively (try getObject, then see what it's an instanceof)? Just guessing, maybe the actual database fields don't match the types you're expecting.
    And why don't you try ex.printStackTrace() to see what the actual error is in the getOb method?

  • Help needed with variable - trying to get data from Oracle using linked svr

    Sorry if I posted this in the wrong forum - I just didn't know where to post it.
    I'm trying to write a simple stored procedure to get data from an oracle database via a linked server in SQL Enterprise manager. I have no idea how to pass a variable to oracle.
    Here's how I would get the variable in SQL:
    declare @maxkey INTEGER
    select @maxkey= MAX(keyfield) from [server].Data_Warehouse.dbo.mytable
    select * from [server].Data_Warehouse.dbo.mydetailtable where keyfield=@maxkey
    the select statement I need to do in oracle would use that variable like this:
    select * from OPENQUERY(OracleLinkedServer,'select
    * from ORACLEDB.TABLE where keyfield > @maxkey')
    and I get this message: OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer" returned message "ORA-00936: missing expression".
    I realize that I can't pass the @maxkey variable to oracle - so how do I accomplish this?

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • Filters on non-conforming dimensions when fetching data from multiple facts

    Hi,
    I would like to confirm my understanding about how OBI fetches data from multiple facts. I have set up the BMM layer. Through Answers I am getting data from multiple facts as expected. However, is it necessary to base filters only on the conforming dimensions? If I do so, I am getting the correct data. But if I filter data on non-conforming dimensions, then I am getting more data which I am not expecting.
    Suppose, Fact1, Fact2 and Fact3 share a CommonDim dimension. If I have a filter on CommonDim, then the filter is used on the three fact tables. However, if I filter data based on Fact1's DimTwo which is not shared by Fact2 and Fact3 and I have measurements from all the fact tables, then from the SQL generated, it seems that OBI is fecting all data from Fact2 and Fact3 and data from Fact1 where DimTwo = 'SomeValue'. Then it seems to be merging the data from the three result sets.
    Is this expected, esp. a scenario where a filter is based on a non-conforming dimension (DimTwo in the example)? Have I missed anything? What do I need to do, if I want to return rows from Fact1 based on DimTwo's filter and then if there is data on Fact2 and Fact3 based on the value in CommonDim corresponding to DimTwo's filter?
    Please let me know.
    Thanks and regards,
    Manoj.
    PS.: I have got a link now which is http://obibb.wordpress.com/2010/06/06/multiple-fact-reporting-on-non-conforming-dimensions-part-ii/
    Edited by: mandix on 25-Oct-2011 12:01

    Hi
    The problem you describe is similar to mine (I wrote several threads ago).
    That is, if there is a non-conformed dimension in a report then the column from the fact table which is not connected with those non-conformed dimensions containes zeros or blanks.
    Was this problem solved? I didn't quite catch one of previuos messages... If you can please repeat it more detailed.
    What I tried to do is to set Total level in the Content tab (LTS properties). In this example - I could set Total level to JOBS in the plan type dimension. But it didn't help.
    So if you know what to do then please describe it here...

  • How to get data from database to JComboBox

    hi
    i am trying to get data which is in database. here the problem is i am getting only one row in the JcomboBox
    i want all data just like list. i dont know how to get that . below is the code plz any one help me....
    import javax.swing.*;
    import javax.swing.JList.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.String.*;
    import java.lang.Integer.*;
    import java.sql.*;
    public class customer_code extends JFrame implements ActionListener
    Container c=getContentPane();
    JLabel customer_code=new JLabel("Customer Code and Name");
    customer_code()
    super("Customer Details");
    setSize(300,250);
    setVisible(true);
    setLayout(null);
    setLocation(430,310);
    Font f=new Font("SansSerif",1,16);
    Font f1=new Font("SansSerif",0,14);
    customer_code.setBounds(10,20,250,30);
    add(customer_code);
    customer_code.setFont(f);
    ResultSet rs=null;
    String j=null,k=null;
    try
    System.out.println("MySQL Connect Example.");
    Statement st=null;
    Connection con=null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:project","vikky","vishu");
    System.out.println("Connected to the database");
    st=con.createStatement();
    rs=st.executeQuery(" select code as c,Customer_name as n from customer_details ");
    while(rs.next())
    j=rs.getString("c");
    k=rs.getString("n");
    System.out.println(j);
    System.out.println(k);
    String[] names = new String[] {j,k};
    JComboBox comboBox = new JComboBox(names);
    add(comboBox);
    comboBox.setBounds(25,60,250,50);
    comboBox.setFont(f);
    comboBox.addActionListener(this);
    comboBox.setMaximumRowCount(10);
    con.close();
    System.out.println("Disconnected from database");
    catch (Exception e)
    e.printStackTrace();
    public void actionPerformed(ActionEvent event)
    if ("comboBoxChanged".equals(event.getActionCommand()))
    System.out.println("User has selected an item from the combo box.");
    JComboBox comboBox = (JComboBox) event.getSource();
    if(comboBox.getSelectedItem().equals("None"))
    public static void main(String agr[])
    customer_code cd=new customer_code();
    }

    r035198x wrote:
    Also separate that database code from interface display code.
    You should never access the database on the EDT.
    See [Doing Swing Right|http://bytes.com/topic/java/insights/853297-doing-swing-right] for more details.
    Yes! By the time you are working with Swing and JDBC you should already know how to structure code. If not, then you are not ready for these topics and you've jumped the gun.

  • Single query to get data from different databases

    i need to capture certain fields from certain tables in database 1 and certain fields from certain tables in database 2 into one file using a single SQL statement.
    i tried searching on the net
    i found that dblinks can help
    but iam not sure if ill be able to create dblinks in my situation which is:
    i need to get data from oracle to be copied to mysql
    this is not a replication acitivity, but i need certain fields from one database and certain from the other
    so what iwas thinking is, if i use an sql query to get all the fields (i need around 40) from the different oracle databases and create a singlefile with one insert per select, i can then read that file into mysql
    instead of creating multiple sql queries for each table and creating separate files and eventually separate tables in mysql.
    can anyone help me here?
    or maybe suggest another approach.
    thanks

    Hi,
    I think dblink is the only option available to get data from different databases. It will work for your case too.
    CREATE DATABASE LINK db_link CONNECT TO user_name IDENTIFIED BY  password USING 'instance_name'you must have the system privilege 'create database link' to create db links. This way you can get the required data and put it in a table in oracle. But i dont know how to put this data from oracle table to Mysql.
    HTH
    Muneer

Maybe you are looking for

  • Is it possible to use my Zen for an external hard drive?

    I want to use my zen for a storage device to my PVR. Is there a way to activate it so that it acts like a hard dri've or usb hard dri've when connected? I have the 6gb Thanks!

  • Home Hub Username and password

    Hi, I was trying to access the basic configuration of my home hub in the Hub Manager and I was asked to enter my username and password. I have no idea what my user name is and have tried using the SN on the back of my hub but alas it does not work. C

  • Add new pages to a photo project

    This question was posted in response to the following article: http://help.adobe.com/en_US/photoshopelements/using/WS287f927bd30d4b1f561c711e12e28a900cc- 7fe2.html

  • How I do add new field

    Hi. I'm learning to work with MDM and I need to create a new field in a table and I can not generate the xsd file to update the PI and the sap. Can anyone help me?

  • TS1363 my ipod is locked and wont open

    I can't unlock my ipod help