Hi all,
I am trying to test the variable @INROWNUM in a transformer stage against a number like the following:
If (@INROWNUM <= 300000) Then "2003-12-21" else if (@INROWNUM < 600000) And @INROWNUM > 300000) Then "2003-12-28" else "2004-01-04"
. The job works fine but even if 900 000 rows are being processed. They all get the first option ("2003-12-21") like the row number never goes over 300 000. I tried a lot of variations like putting my number inside quotes or doing a StringToDecimal() on my arguments but it's still the same. Has any of you tried to use @INROWNUM inside a transfomer and if so, how can you access it's numerical value?
Thanks
Mat
System variable @INROWNUM compare with decimal
Moderators: chulett, rschirm, roy
System variable @INROWNUM compare with decimal
Seems like it should work, so I don't know why it's not. Can you look at the compiled transform code and determine what type @INROWNUM is and if it is ever initialized and/or incremented? If you don't know C, just post the code and we'll help you look for it.
If you can't get inrownum to work, try using a row-counter stage variable.
- BP
If you can't get inrownum to work, try using a row-counter stage variable.
- BP
Ok...this is weird. I tried testing if (@INROWNUM < 30)... and it worked! Same for 300, 3000, 30000 but it does not work for 300000!!!! The variable holding @INROWNUM is uint64 .....isn't it 64 bits long??
It should handle 300000 without problems!
Anyway, I will keep it like that.
Thanks for your help BP
Mat
It should handle 300000 without problems!
Anyway, I will keep it like that.
Thanks for your help BP
Mat
System variable @INROWNUM compare with decimal
That is weird. Are you planning on filing a bug report with Ascential? We'd like to know the outcome if you do.
Thanks,
BP
Thanks,
BP
Dividing?
Have you tried doing a Divide or modulo on @INROWNUM?
Also, create a Sequential output and move @INROWNUM to it and see what happens if it gets over say 250000.
Also, create a Sequential output and move @INROWNUM to it and see what happens if it gets over say 250000.
System variable @INROWNUM compare with decimal
I'm wondering if you need consider the partition number when you use @INROWNUM. Another other thing to try:
Collect all your data into a single stream and see if the same conversion logic yeilds the correct results.
Collect all your data into a single stream and see if the same conversion logic yeilds the correct results.