cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender

Former Member
0 Kudos

Hi Xi Gurus,

I have couple of questions,can any one please explain me clearly for the following questions..

1)when we are doing jdbc to file I have 2 columns in my database let say empname and empno,so my requirement is to get the detailse of these two columns..if so hw should i create my data type in IR(Data Type).Do i need to mention any rootnode for the above two columns in IR?

2)when i am looking at JDBC sender communication chanel I can able to see few processing paratmeters...in that i have few doubts?

i)what is the exact use of Document Name and Document Namespace and UpdateSQL statement.

3)In the above three parameters,we have update SQL Statement which is mandataory in CC,my doubts is when i am selecting data from data base why should I write update statement even i am not updating anything i am just reteriving data from database.

Hope you all understand my doubts.Please clarify my doubts with clearexplanantion.

Thanks,

sekhar

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

1--->

<MESSAGETYPENAME>
<row> 1.. Ub
    <EMPNAME> </EMPNAME> 0..1
   <EMPNo>   </EMPNo> 0..1
</row>
</MESSAGETYPENAME>

2 -->In the sender JDBC adapter , the documentname will be the messagetype name, documentnamesapce will be the namespace.!

3--> If you do not want to Update , make the update field as <b><TEST></b> .

But for every polling interval the data that satisfies the query will be selected and this can cause replication of same data.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I am vey thankful to you for your great response..Can you please clarify the following doubts.

1) I know that we should i need to mention message typename and row?why we need to use row only..can i use any name instead of row?what is the concept behind this?

2)why should i use update statement when i am selecting data from the data base..what is the exact concept of this?

Explain me clearly

Thanks

Sekhar

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The JDBC adapter after picking up the rows from the database, needs to convert it into an XML. Now, the DocumentName field will allow you to create the MessageType or the Root Node.

There can be multiple Rows that the select query can satisfy and so, the JDBC sender adapter when creating the datatype / XML message will need to distinguish between the indicvidual rows and so it creates the element ROW. The Message Type that we create should also have ROW compulsorily as that is the way the Sender JDBC adapter will create the data!

2 -->

Every polling interval, the sender JDBC adapter will see if there are any rows in the database that satisfy the select query. Now, if the data is available it will pick up the rows and create the XML message and pass it to the integration engine.

Consider that you do not have an Update statement, and the polling interval is 10 seconds. So every 10 seconds it will find the same rows available in the database table and keep creating the message and this can lead to redundant data in XI.

So , after selecting the data from the database, you use the Update statement to update the data in the table so that they are not selected again and there is no redundant data.

Regards

Bhavesh

Former Member
0 Kudos

Hi,

The JDBC sender adapter converts the table resulting from the query SQL statement into a valid XML document and sends it to the Integration Engine. The strucure is predefined. There isn't any logic for that.

If you dont use the update statement then your channel picks the same data again and again.

Regards,

Sudheer.

Former Member
0 Kudos

Hi,

The select statement keeps on trigerring the scenario.

To stop this, i.e, to make the scenario to execute only once for unique rows in the table, update statement is used.

For example, you want to select id and name from a table based on field in the table say "boolean".

Initially set this field to true.

Write the select statement based on the condition boolean=true.

Then in update statement set boolean=false.

This will make that row unsatisfied for the next select statement.

Regards,

Uma

Former Member
0 Kudos

Hi Bhavesh,,

I have one small doubt...When we are giving Document name we are calling message type..Can you please tell why do we use message type rather than Data type name?

Thanks

Sekhar

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

When you create a file to file, we create the data with the MESSAGE TYPE right? Similarly, as the message Type is the means in which mapping happens, we need to give the message type name.

Datatypes are just containers for MessageTypes . We never use them adapter from referencing them in Message Types!

Regards

Bhavesh

Former Member
0 Kudos

Hi,

For technical reasons, a data type is not sufficient to describe the instance of a message. In XML schema, data types are defined as abstract types that are not yet fixed to an element. You can only describe an instance of a message when you have specified a data type as an element type. Therefore, a message type defines the root element of a message.

Please refer this link for the same.

http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/c0633c3a892251e10000000a114084/content.htm

Regards,

sudheer.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sekhar,

Regarding as to why the message type is used rather than data type is that

" A data type is a basic unit for defining the structure of the data " and "A message type comprises a data type that describes the structure of a message".So ypu need to transport the structure of the message over the interfaces.

Interfaces do understand the language of message types rather than data types.

Hope this could clear a doubt to some extent.

Please do correct me if i'm wrong.

Regards

Madhu

Former Member
0 Kudos

Hi,

Check this link it will solve al ur doubts.

http://help.sap.com/saphelp_nw2004s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm

Go to Configuring Sender JDBC Adapter.

Thanks.