Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Recherche

Hello,

would you help me to correct this codes? Thank you first!

the goal is to have a table as:

TNom1, TNom2

AA, AA CC DD

ABAA, AB

AA CC, AA CC DD

I have to use the method following (do while), because, the truth datas are too big, I can't use "left join".

the second do while can't work, j=1 always.

T1:

load * inline [

Nom1,

AA,

ABAA,

AA CC

]

;

T2:

load * inline [

Nom2,

EE,

AB,

AA CC DD

]

;

let i = 1;

do while i<=3

    let j = 1;

    do while j <=3

        T:

        load

        peek(Nom1, $(j), 'T1') as TNOM1,

        peek(Nom2, $(j), 'T2') as TNOM2

        Resident T1

        where index( peek(Nom1, $(i), 'T1'), peek(Nom2, $(j), 'T2'), 1) >0 or index( peek(Nom2, $(j), 'T2'), peek(Nom1, $(i), 'T1'), 1)>0 ;

    j = j+1;

    loop 

i = i+1

loop

;

drop table T1, T2;

;

6 Replies
ramoncova06
Specialist III
Specialist III

do you have a key field that can be used to join/map them ?

Not applicable
Author

Ah I find the error

Not applicable
Author

Thank you, I found the problem.

when the data is very big, we can't use join first i think.

ramoncova06
Specialist III
Specialist III

it does depend if you just want to join one field then a map is better, but if you want to join several fields then you could use the join, though you have to be careful and always have a field that matches on both tables, otherwise you would end up creating a cartesian product 

Not applicable
Author

I recherche the thing not exactly the same, for exemple "A" is in "AB", we can't use join for this, no?

Not applicable
Author

Ah non