Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
source
target
By using this source file how to get multiple dates in order
Can you please help me.I tried with tjava and tloop but not able to do
This is actually a bit tricky.
I did some rough work and came up with this solution. Hope it gives you some idea.
You have to first calculate the difference between the start date and end date and store it in a context value.
Then for each row, you have to use the tLoop component to generate the missing dates.
The layout of the job,
tMap12 Config,
tJava Code,
tLoop Config,
tFixedFlow Component Config,
tMap13 config,
Here we have two contexts created. One is the context Loop of integer datatype for storing the max loop number.
Other one is the context startDate of datatype date for storing the starting date.
Remember to check the append option if your output is a file.
There might be a better way to do this. Hopefully this template gets you started on what you want.
thank u very much i will try and let u know
Hi,
Thanks to @ArvinRapt to have detailed the solution I proposed.
I don't think it's too much tricky.
Maybe you can change tJava by tSetGlobalVar and use global variables instead of context variables, but it's a detail.
Also I think you can move the operation made in the tMap into the tFixedFlowInput component to comple the startDate field.
Regards,
@TRF Agreed. Those two suggestions make the job easier on the eyes.