Hi,
I am trying to do a look up on a table (Product table, having columns Product_key,Product_code) using a code (say Product_code) coming from a input file.
After the lookup i want to return the primary key(Product_key).
Please tell me which component should i use. I tried using LookupJoin but i couldn't find where do i specify the return value(Product_key).
Much Thanks,
Indu
I am trying to do a look up on a table (Product table, having columns Product_key,Product_code) using a code (say Product_code) coming from a input file.
After the lookup i want to return the primary key(Product_key).
Please tell me which component should i use. I tried using LookupJoin but i couldn't find where do i specify the return value(Product_key).
Much Thanks,
Indu
-
Hello Indu,
lookup table serves as virtual port in LookupJoin component, so to refer the data use just notation as for 1st input port: $1.fieldName (see attached graph as example). -
Hi Agata,
Tried to create a graph following your graph. The graph is running successfully but there are no outputs!
The data source field seems to be empty in your graph. Is that the problem that i am not getting the output??
Also the Data Source tab takes FileURL, is there any way that i can connect to the DB by giving connection details (like host name/username/password)?
Thanks,
Indu -
Hello Indu,
you need to pre-fill the lookup table with data of course. You have a few possibilities:- use DBJoin instead of LookupJoin
- use DBLookup instead of SimpleLookup
In both above cases your query should look something like:
select * from "Product table" where Product_code = ? - Pre-fill your lookup table with DBInputTable --> LookupTableReaderWriter
-
Thanks Agata,
It worked with DBLookup :)
Please sign in to leave a comment.
Comments 4