'How to use range join between 2 dataframes in pyspark

i have 2 dataframes productDates and dimDate. dimDate has range of dates for every year. I wanted to generate range of dates falls between minDate and maxDate for every product.

enter image description here

Finally after joining 2 dataframes, output df will be..

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source