• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Always joining with the latest dimension

#1 2012-05-24 11:47:46

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

[resolved] Always joining with the latest dimension

Hi,

We are using TOS 4.1.2

tfileinputdelimited--> tmap --> toracleoutput (facttable1)
                                 ^
                                  | (lookup)
                                  |
                          toracleinput (dimtable1)

Feed file
SG,sg1
SG,sg2

Lookup table
ctry_key,ctry,ctry_other
1,SG,sg1
2,SG,sg1

output
2,SG,sg1
3,SG,sg2

1. in tmap joining only ctry & ctry_other fields
2. ctry_key values is generated from a oracle sequence
3. whenever we run the job it always picks the latest key value for the ctry and ctry_other combination.
4. even we deleted both values in lookup table and recreated the records with difft keys.  still the job picks the key from the record that was created at last
4. I am expecting the output could be one of the below apart from the above actual output

output possibilities
1,SG,sg1
3,SG,sg2

[or]
1,SG,sg1
2,SG,sg1
3,SG,sg2

[or]
error as the ctry, ctry_other join returns more than one ctry_key (something like - single row subquery returns multiple rows)

Is this how TOS works

Last edited by pgmuthukumar (2012-05-24 11:49:42)

Offline

#2 2012-05-25 04:02:06

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: [resolved] Always joining with the latest dimension

Hi

You'd better select 'All matches' for match model in tMap.
Then you will get
1,SG,sg1
2,SG,sg1
3,SG,sg2

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-05-25 06:12:32

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

Re: [resolved] Always joining with the latest dimension

Hi,
thanks for your reply.
As of now my match model is set to 'Unique match'. How TOS picks the key from the latest record created.

Regards,

Offline

#4 2012-05-25 06:13:37

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: [resolved] Always joining with the latest dimension

Hi

'Unique match' means 'Last match'...

Regards,
Pedro


Only Paranoid Survive.

Offline

#5 2012-05-25 07:44:59

pgmuthukumar
Member
Registered: 2012-05-08
Posts: 79

Re: [resolved] Always joining with the latest dimension

thanks for the clarification.

there is a relevant post:
tMap in Java Unique, First, ... Match

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Always joining with the latest dimension

Board footer

Powered by FluxBB