Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an excel file that contains data(tFileInputDelimited), I have to create a column that contains a value that increments by 10 for each product:
here is the input file
product | sub_product
product 1 | sub_product 1
product 1 | sub_product 2
product 1 | sub_product 3
product 2 | sub_product 5
product 2 | sub_product 6
here is the output file:
product | sub_product | incremental_value
product 1 | sub_product 1 | 10
product 1 | sub_product 2 | 20
product 1 | sub_product 3 | 30
product 2 | sub_product 4 | 10
product 2 | sub_product 5 | 20
in this case in each time we have a new product we increment by 10. I try to use tJava and tJavaRow bu i can't do this.
Can you help me please
it's normal you have to use one sequence for each product
so if product is a String data :
for eg : if your main input is row1 and the input field is product
Numeric.sequence(row1.product,10,10)
Hi, sequence can help you , for eg in the tmap output field you want to increment :
Numeric.sequence("s1",10,10)
Send me love and kudos
@gjeremy1617088143 Thanks for your feedback
I have already tried this solution but it increments all the fields to 10, I get 10,20,30,.... even if I change product.
it's normal you have to use one sequence for each product
so if product is a String data :
for eg : if your main input is row1 and the input field is product
Numeric.sequence(row1.product,10,10)
@gjeremy1617088143 it works very well thank you very much