Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this is my first post here in talend community.
productsFile:
product_id | target |
Maxplore_4G | ALL |
discountsFile:
discount_id | product_id | target |
Maxplore_4G_2_55000_A | Maxplore_4G | |1|2|3|4|5|6|7|8|9|10|11|12| |
Maxplore_4G_2_55000_B | Maxplore_4G | |1|2|3|4|5|6|7|8|9|10|11|12| |
Maxplore_4G_3_90000_Q | Maxplore_4G | |1| |
Maxplore_4G_3_90000_R | Maxplore_4G | ALL |
Expected Output
product_id | discount_id | target |
Maxplore_4G | ALL | |
Maxplore_4G | Maxplore_4G_2_55000_A | |1|2|3|4|5|6|7|8|9|10|11|12| |
Maxplore_4G | Maxplore_4G_2_55000_B | |1|2|3|4|5|6|7|8|9|10|11|12| |
Maxplore_4G | Maxplore_4G_3_90000_Q | |1| |
Maxplore_4G | Maxplore_4G_3_90000_R | ALL |
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
HI Are you looking for the following output?
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,
HI Are you looking for the following output?
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,
It's almost there
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