hi,
I have a problem with look up.
I need to have a field value from another target table say"DD".
so i created a look up table in my current map.but how to link its input port??
can anyone give a good example for unconnected look up.
thanks!!!
I assume that you know how to get the target table and the field.
Must be wondering where to get the in_fld1 value.
Lets say that in your mapping you have a source definiton in which you have the field that you want to specify in your input field ( eg Bank ).since its an unconnected lookup , you obviously dont link the port to the input port of the lookup.
Therefore what you need to do is to pass the field in the source def to a expression transformation.
create another port in the exp trans and call it o_lkp or something.
In the expression box
Hi,
I'm telling you step by step.
a) Say you have a port called Input_Field in your source table based on which you want the field DD from your lookup table. Assume you have another field called Lkp_Field in the lookup table which you need to match with the Input_Field, and if these match, you get the DD.
b) Get the Lookup table in your mapping using a lookup transformation say with name Lkp_DD(Don't connect any link from anywhere, that's why unconnected lookup).
c) Mark Lkp_Field and DD as lookup port.
d) Manually create a port with name Input_Field and datatype and precision as given in the source table.
e) Specify the lookup condition as Input_Field=Lkp_Field.
f) Mark the DD port as return port.
g) Now proceed with the port Input_Field from the source qualifier. Take it in an expression transformation.
h)Create an output port with name Output_DD.
i) Put the expression :LKP.Lkp_DD(Input_Field)
So in the expression transformation Input_Field will be replaced by corresponding DD value.
Things to take care of:
a) It is always better to use connected lookup rather than unconnected lookup.
b)There should be only one return port in the lookup transformation.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.