cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC LookUp - Multiple Records

Former Member
0 Kudos

Hello Experts,

My Scenario is a File to File and in the mapping need to perform a lookup from database table to extract GUID's for three input fields.At my source structure there are 3 input fileds( Staff_Id, Manager_Id,Partner_Id) and need to extratc their respecive GUID's(GUID,MGUID,PGUID - field names) from the database table and need to to pass it through targte data structure.

And my incoming message is a huge one which contains more than1k records.

I had a few queries -

1.Is a single JDBC Lookup(can we handle to get three different values) will suffice for my purpose - if my source message contains a single record

2.Need to write a UDF using the LOOUP API (database accessor) - could you please throw some info on this to how to handle for three fields and for multiple records.

Please share any ideas/

Thanks

Regards

Narayanareddy B

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

1.Is a single JDBC Lookup(can we handle to get three different values) will suffice for my purpose - if my source message contains a single record

Yes

2.Need to write a UDF using the LOOUP API (database accessor) - could you please throw some info on this to how to handle for three fields and for multiple records.

Are the three values you mentioned contained in the same table or separate tables.

In case of different tables I suggest you frame your query using Joins

Else use

channel = LookupService.getChannel(<channel name>);

String query ="SELECT GUID,MGUID,PGUID FROM table1 GROUP BY value1, value2, value3;"