Hi All,
I have a scenario where I need to truncate full table and then load full table.
What is the best design approach for this.
1. Do I create two separate interface and then use the option of maintain order at runtime in interface determination where I first call the truncate interface and then Bulk insert
2. Do I create two Statements in the JDBC reveiver root message type and in mapping first call the Delete and then Insert, like below. What if delete works and Insert fails, how do I handle that.
<root>
<StatementName1>
<anyName action=” SQL_QUERY” | “SQL_DML”>
<access>Truncate table "New_Hires";</access>
</anyName >
</StatementName1>
<StatementName2>
<dbTableName action=”INSERT”>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName2>
</root>
Thx in advance
Ravijeet