Hi,
I would like to use or condition tmap while joining with a lookup table. Can anyone share how that can be done? Below, i have given the table structure and join query. I want to achieve join query using tmap. How can i do that?
Table A (Main Table)
----------
Name,
Id_1,
Id_2
Table B (Lookup Table)
------------
Table B (Lookup)
------------------
Id,
Address,
Region
SELECT A.NAME, B.ADDRESS, B.REGION
FROM A, B
WHERE A.ID_1 = B.ID OR A.ID_2 = B.ID
The best way, I think, is to have two left-join lookups from Table B with an appropriate condition on your output e.g. Lookup1.Address != null || Lookup2.Address != null
Hi sree,
To make you clear, I have designed a demo job with troubleshoots.
Here are two files
1(main)
id;id1
12;24
13;26
15;30
2(lookUP)
id;name;address;region
12;dan;uk;LD
26;petter;uk;SF
15;merry;US;NY
24;shong;china;hn
60;sabrina;china;bj
The work flow is : tFileInputDelimited-->tMap-->tLogrow
Please see the screenshots for details
Does this example still works ? I tried the same job, with same data and components. I can read the data in input, from the tFileInputDelimited, but my output is empty ; it looks like the join / condition does not work.