Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
JayZ1
Contributor III
Contributor III

Dynamically changing a value using maps

I am currently getting data from a database, specifically 2 columns that are important. 

 

Database1:

userID

Email

 

Database2 (Source of validating database 1 information)

userID

Email

 

In database1 the ideally I would take the userID and use a tMap and find the corresponding userID and Email from Database 2 and pass the email forward for my talend script to use. However database1 has some bad data so I want my use case to be like:

 

First I check the userID from database 1 and see if it exists in database 2, if it does proceed as mentioned above and pass the Email through. In the case the userID does not exist in database 2 I want to pass the Email from Database1 and see if it exists in Database 2, if it does pass it through, if it doesn't I will just pass nothing. 

 

I know the latter is possible but not sure about dynamically checking and doing both of these cases where its required

Labels (2)
3 Replies
Shicong_Hong
Support
Support

@JayZ1 Take a look at this KB article to learn how to do an inner join on tMap and get the matched/unmatched rows. In your case, you need to do inner joins two times, let me know if you have any questions.

 

 

JayZ1
Contributor III
Contributor III
Author

I think you may have forgotten to include an article

Shicong_Hong
Support
Support

Sorry, i have included the article URL.