Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Left Join and tMap

Hi,
I have some questions about joins in the tMap component.
1/ If I use a left join (ie inner join is unchecked) between rowA and rowB, what does happen to the rowB structure when no rows matches the rowA ? Does rowB equals to null ? Or does rowB exists but with each of its field equal to null ?
2/ How can I test in the tMap if rowA did found a match or not ?
Thanks for your help.
Labels (2)
4 Replies
Anonymous
Not applicable

Hello
1/ If I use a left join (ie inner join is unchecked) between rowA and rowB, what does happen to the rowB structure when no rows matches the rowA ? Does rowB equals to null ? Or does rowB exists but with each of its field equal to null ?

The columns from rowB will be null. see 1659.
2/ How can I test in the tMap if rowA did found a match or not ?

Link the output table to tLogRow which is used to display the result on console.
Best regards

shong
_AnonymousUser
Specialist III
Specialist III
Author

Hi shong,
thanks for your reply.
So if rowA doesn't match rowB, all non nullable fields of rowB get default values ?
0 for integers, "" for Strings, 01/01/1970 for Dates and so on ?
That's really surprising...
So, how can I distinguish the case where rowB did match or not in the following case:
rowA (int id, String name)
0, Peter
1, John
2, Mark
rowB (int id, int amount)
1, 15
2, 10
After a left join I get: (id, name, amount)
0, Peter, 0
1, John, 15
2, Mark, 10
How do I know if Peter has an amount of 0 because it exists in rowB or if Peter doesn't exist in rowB ?
amaumont
Contributor III
Contributor III

For the moment, it is necessary that at least one of your lookup's column be a nullable type.
Soon, a method call on the connection such as :
rowB.hasMatched()

will be possible.
There is an issue on this subject https://community.talend.com/t5/Installing-and-Upgrading/TOS-working-with-Microsoft-Terminal-Server-...
_AnonymousUser
Specialist III
Specialist III
Author

> For the moment, it is necessary that at least one of your lookup's column be a nullable type
Hi, even that is not a sufficient condition because the column could be null in the input data but ok, I will wait for the hasMatched() function.
Regards.