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: 
Andywang
Contributor
Contributor

how to build a small data dictionary

I have two file:

A: two columns: the first column is text and second is values.

B: three columns:

the first column is text , the second is values, and the third one is text.

Aim: for each text in the column 1st from A and each value of 2nd from A, we would like to find that search these pari in the 1st and 2nd column in B and out put the corresponding text in 3rd column.

File A

CA 1

CB 2

....

File B

CA 1 Mike

CA 2 Jack

CA 3 Sara

CB 1 Ketty

CB 2 John

CB 3 Andy

.....

Like a example: we have CA and 1, we could return "Mike"

I know we could build a dictionary, however, which comment shall we used?

Thanks and best,

Xinhui

Labels (3)
4 Replies
Anonymous
Not applicable

You just need to do an inner join? see this article:

https://community.talend.com/s/article/Doing-an-inner-join-using-a-tMap-component-i5Mrr

 

Andywang
Contributor
Contributor
Author

thanks. It worked indeed.

Now I have a another table A as

names CA CB

p1 1 2

p2 2 3

.....

I would like find the all the corresponding text.

Like for p1, CA =1 CB=2, then we have: p1 on CA as Mike, on CB as John.

Is there a fast idea?

Thanks,

Best,

xinhui

Anonymous
Not applicable

Hi

Just select names, CA fields from table A, and then add a new column and set its value as "CA" , then do an inner join with File B to get the text.

Do the same thing for CB field, finally, merge the result based on names field if needed.

 

Regards

Shong

Andywang
Contributor
Contributor
Author

sorry! really have no idea where to add new column and set as ""CA", you means add a new column at "metadata"?