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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap and conditional join

Hi,
I'm trying to join a customer row with start and end dates to a generic calendar in tMap, so that I could get the following result
Customer:
CustomerX, 2012/01/01, 2012/01/04
Joined with calendar:
...
2012/01/01
2012/01/02
2012/01/03
2012/01/04
...
Output:
CustomerX, 2012/01/01
CustomerX, 2012/01/02
CustomerX, 2012/01/03
CustomerX, 2012/01/04
I tried to enter the logic in tMaps "Expr. key" like this:
cust.StartDate <= calendar.Date && cust.EndDate >= calendar.Date
But it seems that "Expr. key" doesn't work like that.
How can I do a join like this?
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,
I think you can try the component tIntervalMatch to do this case.
https://help.talend.com/search/all?query=tIntervalMatch&content-lang=en
regards
Anonymous
Not applicable
Author

tIntervalMatch seems to do the lookup backwards. In order to get the correct amount of rows, I need to bring the calendar in as main and use my real data as lookup, so that I can define the correct min/max values. But this prevents me from bringing any other columns from my data except the lookup-column.
I could do normalize/denormalize before and after the intervalmatch, but that seems a really clunky solution.
Are there any other ways I could achieve what I'm trying to do?