Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dhasharadh
Creator III
Creator III

Autogenerate : Generate count is Negative

Getting this below error all of a sudden, it was fine till last friday and it suddenly failed today with below error.

Error : Autogenerate : Generate Count is Negative.

Error is coming in the below script lines :

DateField_tmp:
LOAD
Date($(vDateMinN)+RowNo()-1) AS DateField
AUTOGENERATE $(vDateMaxN) - $(vDateMinN) + 1;

------ script is executed till here.
DateFieldPro_tmp:
LOAD
Date(($(vDateMaxN)+1) +RowNo()-1) AS DateFieldPro
AUTOGENERATE $(vDateProN) - ($(vDateMaxN)+1) + 1;

--- getting an error in the above lines am littterally cluless why all of a sudden this error is coming in UAT and Prod causing jobs to fail. 

Please suggest the possible reason @jonathandienst  @tresesco @petter 

Any one else who have idea on this as well please. 

Labels (2)
1 Solution

Accepted Solutions
dhasharadh
Creator III
Creator III
Author

Its fixed actually, 

in one of the variable declaration they mentioned it as 31.12.2020 using make date function. w

which got expired and reason for negative number during autogenerate. changed it to future date now its sorted. 🙂

 

View solution in original post

4 Replies
edwin
Master II
Master II

can you look up the values of 

 vDateMaxN and vDateMinN 

dhasharadh
Creator III
Creator III
Author

Hi Edwin, thanks for the reply.

vDateMaxN = 04.01.2021

vDateMinN = 01.01.2000

is anything wrong in the above values, they created as variables in the app.

 

tresesco
MVP
MVP

Somehow '$(vDateMaxN) - $(vDateMinN) + 1'  is resulting to a negative number. It could be because of misinterpretation of separator ('.'). Try to convert the date value to number in the variable itself and try. Also check how and which delimiters are being used for number presentation, like decimal, thousand separator. 

dhasharadh
Creator III
Creator III
Author

Its fixed actually, 

in one of the variable declaration they mentioned it as 31.12.2020 using make date function. w

which got expired and reason for negative number during autogenerate. changed it to future date now its sorted. 🙂