Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
android1686764069
Contributor
Contributor

TMAP: join one table with 2 tables and catch rejects

Hello

I have this table:

0695b00000tECksAAG.png

i want to join this tables with 2 other tables: one will give me the country, the other will give me the city. They look like this

0695b00000tEChBAAW.png0695b00000tECofAAG.png

What I want:

I use tmap to make the joins

I want 2 outputs in tmap :

The first output is : as long as I have a country or a city, i want to have a table with the id, the country, the city

The 2nd output is : if I don't have the city and the country i want to have a table with the CODE and the CAP code

I'm stuck because I d'ont know know to configure the tmap, I tried with catch lookup inner join reject = true, but my first outpu will awalys catch rows where I have country and a city but I want country or a city

0695b00000tEBKCAA4.png can you help me?

Labels (2)
2 Replies
Anonymous
Not applicable

Hi

You can't implement it with only one tMap, because it uses the AND operation and cannot be set or operation if there are multiple conditions. I think you need to do the join two times, one for CODE code and another for CAP code, then, do an inner join between the two results based on ID column to merge the all columns (ID, country, city), filter the rows using tFilterRow with the condition the city or the country is not empty.

 

Regards

Shong

 

 

android1686764069
Contributor
Contributor
Author

ok i understand, thank you