J. Nhut
J. Nhut

Reputation: 1

Talend tmap lookup on multiple conditions with the same lookup table

I'm using talend to build out a job but have run into a problem.

I have multiple variables that need to be created that each rely on a lookup of table, 'X'.

For example,

  var_a = tablex.columnA where tablex.columnb == "A"
  var_b = tablex.columnA where tablex.columnc == "B"

etc.

Unfortunately it seems that using the lookup functionality in the left pane affects the entire tmap function - i.e., you can't restrict to columnB for some variables and columnC for others.

Is it possible to build var_a and var_b without having to replicate the lookup table subjob each time? Is there a way to do this using the expression editor?

EDIT: I've drafted a few slides with screenshots to more clearly show my problem. Please take a look here: https://docs.google.com/presentation/d/1OeIGEIpxPXPJtjGAfpAWj83jhCMDSLbSMb3ygZism9Q/edit?usp=sharing

Upvotes: 0

Views: 2231

Answers (1)

PreetyK
PreetyK

Reputation: 451

VarA setting

VarB setting

you need to have 1 person file as main and 2 Address file as lookup because according to your data, for country value you need first match of lookup and for gender value you need the match model as last match.

for first lookup, in tMap match ID column and write the expression for country population given below.

For Second lookup, in tMap match ID column and write the expression for gender population given below

Upvotes: 0

Related Questions