Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Joining multiple tables to single table

Hi,

 

I'm trying to join a couple of database tables to a single table. It pretty much needs to do the following: For every row in 'klantorderregel' table with 'gereed == true' a row needs to be created in 'leveropdracht' containing information from 'klantorderregel', 'klant' and 'product'. However, when I run the job it creates 12 new rows in 'leveropdracht' while there are only 4 that need to be made. Can anyone help me? Here are some screenshots:  

 

0683p000009M57y.png0683p000009M5AX.png

Labels (1)
6 Replies
nivedhitha
Creator III
Creator III

Hi @sjhdonge ,

 

What is the datatype of the column 'gereed'? If it is int, can you please try changing the filter condition on 'klantorderregel' data set(input) to row1.gereed==1 ?

Anonymous
Not applicable
Author

It's boolean. If I remove the expression it will output 24 rows, so I suppose the expression is correct. I think it has something to do with no expr. key existing between klantorderregel and klant. It must actually somehow see what 'klant' (translated customer) is connected to a 'klantorderregel' without the existing column in klantorderregel.

nivedhitha
Creator III
Creator III

@sjhdonge ,

 

okay, so then your filter expression is right.

I see that you are making an inner join, but there are no fields from dataset1 that is pulled to dataset2. marked in red below. So the join is not actually happening.

0683p000009M52t.png

 

 

Anonymous
Not applicable
Author

Yeah I see. Is the only way to solve this by making a new column in dataset 1 and link it to a column from dataset 2?

nivedhitha
Creator III
Creator III

@sjhdonge ,

 

no you don't have to make a new column. columns from the 1st dataset that you are using to join it with dataaset2 should be dragged to the corresponding column in dataset2.0683p000009M4zL.png

in the above screenshot im trying to join 2 datasets on Project_Id column and so I have Project_Id from row1 against Project_Id in row2 dataset and im making a left outer join here.

please take a look at this link if it is not clear
https://www.talend.com/resources/joining-two-data-sources-with-tmap-component/

 

Anonymous
Not applicable
Author

I'll take a look at it tonight