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

Talend join two files by column id and create a new entry

Hi,

 

this is my first post here in talend community.

 

productsFile:

product_idtarget
Maxplore_4GALL

 

discountsFile:

discount_idproduct_idtarget
Maxplore_4G_2_55000_AMaxplore_4G|1|2|3|4|5|6|7|8|9|10|11|12|
Maxplore_4G_2_55000_BMaxplore_4G|1|2|3|4|5|6|7|8|9|10|11|12|
Maxplore_4G_3_90000_QMaxplore_4G|1|
Maxplore_4G_3_90000_RMaxplore_4GALL

 

Expected Output

product_iddiscount_idtarget
Maxplore_4G ALL
Maxplore_4GMaxplore_4G_2_55000_A|1|2|3|4|5|6|7|8|9|10|11|12|
Maxplore_4GMaxplore_4G_2_55000_B|1|2|3|4|5|6|7|8|9|10|11|12|
Maxplore_4GMaxplore_4G_3_90000_Q|1|
Maxplore_4GMaxplore_4G_3_90000_RALL

 

Basically what i want is for each product id in productsFile join discountsFile on discountsFile and also create a new entry without discountId for every distinct productId in productsFile.

 

I was able to do the join using a regular tMap but i have no idea on how to create that empty discountId.

 

Thanks in advance

Labels (2)
1 Solution

Accepted Solutions
vboppudi
Partner - Creator III
Partner - Creator III

HI Are you looking for the following output?

0683p000009LzBz.png

tMap used to join product and discount files to get only discounts available in product table and by using unite union the data product and discounts.

 

Regards,

View solution in original post

2 Replies
vboppudi
Partner - Creator III
Partner - Creator III

HI Are you looking for the following output?

0683p000009LzBz.png

tMap used to join product and discount files to get only discounts available in product table and by using unite union the data product and discounts.

 

Regards,

Anonymous
Not applicable
Author

It's almost there 0683p000009MACn.png

The flow should work based on productId from productsFile.

so for each productId in productsFile we need to go find a match in discountsFile , not the other way.

 

I managed to fix the issue by changing you solution

 

0683p000009LzI1.png0683p000009Lz7E.png