Retriving the inserted data and using in next compenent

I want to insert the data into table and after that want retrieve few columns from the same.

in the DBOutputTable BRANCH_VERSION component i am inserting the data and same data(BUILD_NUMBER data which is auto generated column) i want to get and feed to next component for merging how to achieve this?

MOCI_ECPM.grf attached.

i tried below query inside the DBOutputTable BRANCH_VERSION but it is not returning any data.
INSERT INTO BRANCH_VERSION (BRANCH, BASE_CODE, VERSION_NUMBER, BUILD_NUMBER, PRICE_GROUP, COUNTRY_GROUP, VERSION_SHORT_DESC, VERSION_DESC, EFF_START, EFF_END, BASE_CODE_IND, CURRENCY, LANGUAGE)
VALUES ($BRANCH, $BASE_CODE, $VERSION_NUMBER, $BUILD_NUMBER, $PRICE_GROUP, $COUNTRY_GROUP, $VERSION_SHORT_DESC, $VERSION_DESC, $EFF_START, $EFF_END, $BASE_CODE_IND, $CURRENCY, $LANGUAGE)
RETURNING $id:=AUTO_GENERATED,$BUILD_NUMBER:=$BUILD_NUMBER;

i found one sample example DatabaseAccess.grf where same thing is achieved but somehow when i tried it did not work. DatabaseAccess.grf is also attached. please find loads data component.

Hi Tushar,

The first output port of the DBOutputTable component is for rejected records, the second output port is for returned records.

In your DBOutputTable BRANCH_VERSION you have connected the edge only to the first output port, so if you want to get the returning data, please connect the edge to the second output port and set properly the metadata of this edge (the fields that you want to return).

For more information about DBOutputTable component, please see the documentation:
http://doc.cloveretl.com/documentation/ … table.html