Tuesday, 19 January 2016

Execute “Db2 Sequence” with JDBC Adapter in IBM Integration Designer



Scenario:-
“CustomerDbService” inserts customer records into database and generates sequence id (custid)for each customer record.
  • Create a  customer(CustInfo) table in DB2.
  • Create a sequence (custno_seq)  in DB2.
Table:-
      Create table custinfo(custid integer not null unique, fullname varchar(100), phone            
        char(10),address varchar(50)
 
Sequence:-
              “ create sequence custno_seq as int start with 1000 increment by 1 “ 

“CustomerDbService”  inserts customer records into database and generates sequence id (custid) for each customer record.
  • Create a module with JDBC outbound adapter in IBM Integration Designer.
              


  • Add  “UID “ parameter to in the application-specific information of custid filed in business object.
  • Note:- The adapter uses this parameter to generate the unique ID for the business object. It supports the generation of sequences and identity columns (UID=AUTO|Sequence_Name). Sequences can be defined for DB2® and Oracle databases only. Identity columns can be defined for DB2 and Microsoft® SQL Server. If the attribute does not require a unique ID, do not include this parameter in the application-specific information  
              




  • Test “CustomerDBSImport” using Integrated Test client in IBM ID.  
            
  •  “custid” have a value 1005 which was generated by sequence(custno_seq) .

    Special thank for "Srikanth and Nageswar Rao " for sharing this issue .
    Hope this post helps you. So far this is my best effort to explain. Please correct me if I do anything wrong.
    Please post any issues/query’s related to IBM Bluemix,IBM BPM,WODM and DATAPOWER  to "
    maheshitsolutions@gmail.com”.
    Please share your valuable suggestions and feedback to my mail id"maheshitsolutions@gmail.com" to improve myself without fail.

     

No comments:

Post a Comment