Page 1 of 1

Inserting records based on gaps

Posted: Thu Jul 23, 2015 1:00 am
by vamsi_4a6
if there is any gap i have to create one extra record in output with price as previous one and output is mentioned as below.For understanding purpose i gave one product but we have so many products

source and target is sequential
input
Prd prc effecdate enddate
1 10 1-jan-2010 1-mar-2010
1 15 1-jun-2010 1-Jan-9999

output
Prd prc effecdate enddate
1 10 1-jan-2010 1-mar-2010
1 10 2-mar-2010 30-Jan-2010
1 15 1-jun-2010 1-Jan-9999


I am not sure how to proceed and anybody help on this

Posted: Thu Jul 23, 2015 1:30 am
by ray.wurlod
Pretty much what you've shown us in your one record example. Use a Transformer stage that remembers the previous row and thereby detects any gap, from which it can build the gap-filling record.

It may be easiest to send this gap-filling record onto a separate output link from the Transformer stage, and use a Funnel stage to re-unite the streams subsequently.