on 09-08-2010 11:09 AM
Hi,
We have a requirement to send data to two different tables in the database using jdbc adapter from data files.
So we have one main data file as xml that will send same data to two different table.
How can we fulfill these requiement , please advise .
Thanks
Laxmi Bhushan
When we are posting data using JDBC adapter from PI.
We are using Mapping for Action = Insert
and giving Table = <tableName>.
Now you have to use mapping for 2 tables.
Pass the data in 2 structures, in first structure use First table & in secound structure use 2nd table.
You have to use 1:N mapping concept & in second structure use 2nd table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On Receiver Side try to Create Such Node Structure :
<?xml version="1.0" encoding="UTF-8"?>
<PrimaryInvoiceData> -
ROOTNODE STARTS----
<Update_Insert_INVHDR> -
TABLE A START----
<dbTable action="UPDATE_INSERT">
<table>INVHDR</table>
<access>
<VBELN>7468000071</VBELN>
</access>
<Key>
<VBELN>7468000071</VBELN>
</Key>
</dbTable>
</Update_Insert_INVHDR> -
TABLE A END -
<Update_Insert_INVDET> -
TABLE B START -
<dbTable action="UPDATE_INSERT">
<table>INVDET</table>
<access>
<VBELN>7468000071</VBELN>
</access>
<Key>
<VBELN>7468000071</VBELN>
</Key>
</dbTable>
</Update_Insert_INVDET> -
TABLE B ENDS -
</PrimaryInvoiceData> -
ROOTNODE ENDS----
this structure is with two tables : INVHDR , INVDET
Hope this help you ....
if found any problem ...please do post .....................................
regards
Prabhat Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Laxmi,
Create the Insert structure for JDBC in PI as below:
Suppose Insert_Structure is the structure you are creating.
Then hierarchy would be:
<Insert_Structure>
-
<statement1>
-
<row1>
-
<Action>
-
<table>
-
<access>
-
Field1
-
Field2
-
-
-
FieldN
-
</access>
-
</row1>
-
</statement1>
-
<statement2>
-
<row2>
-
<Action>
-
<table>
-
<access>
-
Field1
-
Field2
-
-
-
FieldN
-
</access>
-
</row2>
-
</statement2>
For Statement1, the action would be Insert and table will have the first table name.
Similarly, for Statement2, the action would be Insert and table will have the second table name.
These values will be hardcoded in mapping.
-Supriya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.