Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please help me on below scenario,
input table:
output Table:
for out table i need to add extra column Wos_fc,
if inv_qty>=net_sale_quantity then value for wos_fc = 0
else if inv_qty <
net_sale_quantity then i need to calculate sum (inv_qty) till value should reach the net_sale_quantity.
example:
net_sale_quantity=110 and inv_qty=110 then wos_fc=0
if net_sale_quantity=110 and inv_qty=55 then value should be calculated as sum(55+10)=60
60<110 so again
sum(55+10+60)=125
now 125>110 ---> so wos_fc=3 (3 becz sumation on three rows to reach condition.
similar for remining rows..
i need to achive this with talend , kindly help me..
Thanks,
sudheer
Hi gjeremy1617088143 ,
Thank you so much for helping me , i will try to understand your answer let you know output..
Thank you so much..
Hi @SUDHEER pasupuleti , you could try something like this
you read your file and you use a tFlowToIterate to make a single flow for each value:
then you use a Tmap to join with the same file and get all the values with date >= to your entry date for eg :
if your input is 21 may you will have :
21 may
28 may
4 jun
11 jun
then you can use a tJavaFlex on the output of the tMap to make a for loop with your conditions
I use tFixedFLowInput 1 and 3 to simulate your file
Hi gjeremy1617088143 ,
Thank you so much for helping me , i will try to understand your answer let you know output..
Thank you so much..
Hi gjeremy,
could please share whole java code in java flex component, i am not able to see that, kindky help me
Hi @SUDHEER pasupuleti , there is the full code in the picture, just a the end the last } is cropped by the component window.
ok, i will check properly.. thank you so much for reply.