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: 
Informatique1
Contributor III
Contributor III

Salesforce innerjoin where in list

Hello,

I need to do an innerjoin in a tMap but I don't know exactly how to do it.

If this was an SQL request I should do something like that:

SELECT * FROM Users

WHERE Secteur IN PostalCode

Secteur could be a list like that "55;60;65;70" in the database. And PostalCode is just a string of 2 digits.

Is it possible to add an expression in the tMap here?

0695b00000kWu89AAC.png

Thanks a lot

Labels (3)
1 Solution

Accepted Solutions
Informatique1
Contributor III
Contributor III
Author

Hello,

 

I answer late cause of holidays...

 

Your solution is not exactly what I want. I really need the left outer join because I want to keep all data from my first table (called json here), and then pick up the sectors of the users.

 

I resolved it by using a tNormalize since my Users table was something like that:

id;role;sectors

123;commercial;31;42;78

tNormalize on sectors, and then inner join + left outer on this with the substring.

 

Thanks for your time and answer 🙂

View solution in original post

3 Replies
Anonymous
Not applicable

Hello,

In the tMap, you can click the filter button and write a filter expression to filter the output data.

Please have a look at this KB article about:

https://community.talend.com/s/article/tMap-expression-syntax-TCiHW

Hope it helps.

Best regards

Sabrina

anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @BOBE Thomas​ 

 

Based on the screenshot you provided, it would only be necessary to change the Join Model from Left Outer Join to Inner Join.

 

That way, compared with a SQL statement, your tMap would be doing something like this:

 

SELECT * FROM json

INNER JOIN Users ON Users.Secteur = json.PostalCode.substring(0,2)

 

And since the "Match Model" is configured for "All matches", this join output would be similar to a "IN" behavior in SQL.

Informatique1
Contributor III
Contributor III
Author

Hello,

 

I answer late cause of holidays...

 

Your solution is not exactly what I want. I really need the left outer join because I want to keep all data from my first table (called json here), and then pick up the sectors of the users.

 

I resolved it by using a tNormalize since my Users table was something like that:

id;role;sectors

123;commercial;31;42;78

tNormalize on sectors, and then inner join + left outer on this with the substring.

 

Thanks for your time and answer 🙂