如何使用PDI将一行分解为多行



我的表有三列:start_date、finish_date和segment_value

The segment_value contains the number of worked hours (it can be 0 as it can be 152 (random))
if (finish_date - start_date) > 7 (jours)
and we supposed that segment_value = 90, it means that we've worked 40 hours the first week (8hours by day), 40 hours the second week, and 10 the third one.
then, I need to load my table by the following :
start_date + 1 week, finih_week_date, 40
start_date + 2 week, finish_week2_date, 40
start_date + 3 week, finish_week3_date, 10

我想使用PDI。感谢

您可以使用修改后的java脚本步骤。。他们可以根据你的需要编写逻辑。

最新更新