how to perform Join between two dates

Six Stars

how to perform Join between two dates

Hi,

 

Could you please help me, how to make a complex join in Talend

My requirement is as below:

 

table1.invoice_date between table2.start_date and table2.end_Date 

and

table1.pk = table2.fk

 

Thanks,

Employee

Re: how to perform Join between two dates

Hi,

 

    Could you please try the below method?

image.png

 

The date expression used in the output expression column is as shown below.

 

TalendDate.compareDate(row1.invoice_date,row2.start_date)>=0 && TalendDate.compareDate(row1.invoice_date,row2.end_date)<=0

Hope I have answered your query. Please spare a second to mark the topic as resolved :-)

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog