Skip to Content
avatar image
Former Member

JDBC LookUp - Multiple Records

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 12, 2014 at 09:38 AM

    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;"


    Add comment
    10|10000 characters needed characters exceeded