Five Stars

allrows in tmap component

what is the purpose of all rows in match model of tmap component

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: allrows in tmap component

This is the thing, I have mentioned above: for lookup table Expression key columns can not be used for join with main table.
In attached screenshot, highlighted area(Expr. Key Area) should be blank. As ALL ROWS will create cartesian join from above table. No need to made join lookup table to main table.
In your case: Return all the desired columns from ROW2 and ROW1 (lookup) table and the number of records return are 8*77. (Rows in the first table multiplied by the number of rows in second table)


Regards,
Mohit
8 REPLIES
Seven Stars

Re: allrows in tmap component

All Match will outputs all matching records of the lookup source.

 

You can refer article on Talend Help

The differences between Unique match, First match and All matches

https://help.talend.com/reader/4sGi6uta35W98meBu6klVg/~1Q8eE0O0Ru1ZGqty7lcJg

 

Five Stars

Re: allrows in tmap component

hi sachin,

                    thanks for your reply, but my question is not about all matches , its about " all rows"

here i attached the snapshot for what i am asking

Capture.PNG

Six Stars

Re: allrows in tmap component

tMap properties- If we are joining two tables then for lookup table, Match Model options worked as below

All Matches: It will perform operations on joining of tables. Joining columns is must for it.

ALL ROWS: It will perform cross join, but for lookup table Expression key column can not be used (you can't join lookup column to other table column). Both Inner and Left Outer Join can be performed. But no joining column will be used.
For eg. If main table have 8 records and lookup table have 9 records, it will show 72 records for all rows. Column can be passed from Lookup table to output table.


Regards,
Mohit
Five Stars

Re: allrows in tmap component

thank you mks

         i got the cross join result, while applying "all rows", but at the same time some warning is displayed at Tmap as shown in fig below. why this warning message or symbol displaysCapture.PNG

Six Stars

Re: allrows in tmap component

This is the thing, I have mentioned above: for lookup table Expression key columns can not be used for join with main table.
In attached screenshot, highlighted area(Expr. Key Area) should be blank. As ALL ROWS will create cartesian join from above table. No need to made join lookup table to main table.
In your case: Return all the desired columns from ROW2 and ROW1 (lookup) table and the number of records return are 8*77. (Rows in the first table multiplied by the number of rows in second table)


Regards,
Mohit
Six Stars

Re: allrows in tmap component

This is the thing, I have mentioned above: for lookup table Expression key columns can not be used for join with main table.
In attached screenshot, highlighted area(Expr. Key Area) should be blank. As ALL ROWS will create cartesian join from above table. No need to made join lookup table to main table.
In your case: Return all the desired columns from ROW2 and ROW1 (lookup) table and the number of records return are 8*77. (Rows in the first table multiplied by the number of rows in second table)


Regards,
Mohit
Seven Stars

Re: allrows in tmap component

@mks02

 

I am using enterprise edition 6.3.1 I cannot see All Rows option in Match Model.

 

I think, even if we use All matches and don't join look up and main flow, it behaves as Cartesian join.

 

 Capture.JPG

Six Stars

Re: allrows in tmap component

@sachinddhake,
I am using 6.4.1, but in 6.3.1 big data enterprise version should have this option.

 

Yes you are right that All matches and don't join look up and main flow, it behaves as Cartesian join.
But you can specify the join in ALL MATCHES option.

In case of ALL ROWS, you can not join the columns for lookup and if you are trying to use it, It will shows the error: "lookup table Expression key column can not be used".

 


Regards,
Mohit