Six Stars

Reference lookup flow variable after tMap

Hi

 

Is there a way to reference/call the original flow variable value after a tMap.

 

To elaborate, I have 2 inputs row1 and row2 which go into a tMap and generate a joined output.

 

I have conditions in the tMap e.g. (row1.PROD_CDE+"").equals(row2.PROD_CDE+"") ? "MATCH" : "MISMATCH "+row1.PROD_CDE+"#" + row2.PROD_CDE+""

 

I'd like to be able to return both the values of row1 and row2 for this field if they don't match however I currently get only the main flow's value and the lookup value returned is the default value of the field like a null or zero(0).

 

I've tried quite a number of things but its clear I need help.

 

Thanks

8 REPLIES
Six Stars

Re: Reference lookup flow variable after tMap

Hello,

 

Can you post some picture oof your job and inside of the tmap component ?

Twelve Stars TRF
Twelve Stars

Re: Reference lookup flow variable after tMap

Because row1 and row2 don't match, there is no current row on the flow associated to row2. That's the reason why.

TRF
Six Stars

Re: Reference lookup flow variable after tMap


TRF wrote:
Because row1 and row2 don't match, there is no current row on the flow associated to row2. That's the reason why.

Hi @TRF

 

This is what I figured as well however I'm asking if there's no way to capture both values or more importantly the lookup's value since the main value remains?

Six Stars

Re: Reference lookup flow variable after tMap

tMap configtMap config

Seven Stars sgv
Seven Stars

Re: Reference lookup flow variable after tMap

Hi,

I think, something is not clear in your head ! Or what you whant to do is inappropriate !

I don't know what your PROD_CDE contains but if you want to join somethink, the action executed by computer is :

  - For each row in your ROW1 schema, he will check if there is a correspondance in your ROW2 schema, with a key.
imagine this :

ROW1.PROD_CDE      ROW2.PROD_CDE

1                                    2

                                      3

                                      4

 

So what you will look like this :

MISMATCH 1#2

MISMATCH 1#3

MISMATCH 1#4

etc ... Imagine with 1000 Values . I think it's not what you want

 

Please, explains the purpose of your job. Maybe you have to change the key of your join condition ??

Good luck ,

SGV

Seven Stars sgv
Seven Stars

Re: Reference lookup flow variable after tMap

Ok, it's more clear.

Remove the PROD_CDE of your join key, then your condition will work  

 

SGV

Six Stars

Re: Reference lookup flow variable after tMap


sgv wrote:

Hi,

I think, something is not clear in your head ! Or what you whant to do is inappropriate !

I don't know what your PROD_CDE contains but if you want to join somethink, the action executed by computer is :

  - For each row in your ROW1 schema, he will check if there is a correspondance in your ROW2 schema, with a key.
imagine this :

ROW1.PROD_CDE      ROW2.PROD_CDE

1                                    2

                                      3

                                      4

 

So what you will look like this :

MISMATCH 1#2

MISMATCH 1#3

MISMATCH 1#4

etc ... Imagine with 1000 Values . I think it's not what you want

 

Please, explains the purpose of your job. Maybe you have to change the key of your join condition ??

Good luck ,

SGV


Hi @sgv

I'm trying to compare ROW1.PROD_CDE for the first record of ROW2.PROD_CDE only once then the second with the second and so forth.

Please let me know if this makes sense?

 

 

Seven Stars sgv
Seven Stars

Re: Reference lookup flow variable after tMap

First, before to compare, you have to be clear with you join key.

I guess, you have 2 tables and you want to see the difference on somes columns between table 1 and table 2. That's right ?

Then, I guess this 2 tables have the same schema. To compare difference between some columns value, you have to define a column

When you want to compare the Table1 with Table2, you will compare Row by Row.

 

Your Join key must be unique and minimalist. Actually you're using all your column in your join key.

So what is your join key ?

You can screenshot an exemple of data containing in your table ?

 

Good luck,

SGV