3 Replies Latest reply on Apr 14, 2018 12:01 PM by Nico Heinze

# IDQ Mapping

Hi

I am creating a mapping in IDQ 10. My requirement is as follows

 Table A Id Type1 Type2 1 1 1 2 1 2 3 2 1 4 2 2

 Table B Source_ID Column1 Column2 Column 3 Column 4 1 2 3 4 5

Now my requirement is as follows

In Table A if Type1 and Type2 is 1 and 1 respectively, I need to pick the value of Column1 from Table B. Similarly if in Table A, Type1 and Type is 1 and 2 respectively, I need to pick the value of Column2 from Table B and so on. Hence my final output will be

 Id Type1 Type2 Value 1 1 1 2 2 1 2 3 3 2 1 4 4 2 2 5

How to achieve this in the mapping?

Thanks & Regards

Kamal

• ###### 1. Re: IDQ Mapping

Hello,

This type of mapping can use an expression to feed the port "Value", cf picture below.

Please us know if it helps.

Thanks & Regards,

• ###### 2. Re: IDQ Mapping

Hi Segolene

Thanks for your reply. This can be done, if I hard code the value, based on the Type 1 and Type 2 combination. But I need to refer to the other table (Table B) and pick the value from specific column based on Type 1 and Type 2. The reason behind this is the value in Table B can change over the period of time. So if value is picked dynamically, I dont have to worry about the change. If I hard-code it in expression without referring table B, then every time I need to change in the Expression

I hope I am able to convey my requirement.

Thanks & Regards

Kamal

• ###### 3. Re: IDQ Mapping

Perform a lookup on table B delivering attributes A, B, C, and D.

Then use the following expression term:

Decode( 2 * Type1 + Type2, 3, A, 4, B, 5, C, 6, D, NULL)

If Type1 = 1 or 2 and Type2 = 1 or 2, then "2 * Type1 + Type2" will yield one of the three values 3, 4, 5, or 6. The Decode() function will deliver either port A or port B or port C or port D or NULL.

Regards,

Nico