Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am attaching the sample qvw file.
I am not getting the counts for LoginsOnThisHost field.
Could somebody please help!!!
After playing with it for some time, here is what seems to be working
Load1:
load * inline
[data1, data2
a,1
b,1
c,-1
d,1
e,-1
b,1
b,-1
a,-1
a,2
a,3
a,4
a,5];
DingoLog:
LOAD *,
if ( Peek(data1)=data1,Peek(data3)+data2,data2) as data3
Resident Load1 Order by data1,data2;
DROP Table Load1;
NOTE: There is some strange difference between peek and previous.
change the 3rd expression as count(LoginsOnThisHos)
Hi,
your expression shows field value only. Try to use something like
count(LoginsOnThisHost) or Sum(LoginsOnThisHost)
Hope it will help.
Thanks Boris and Srikant.
Making it count or sum just makes the point clearer - i get zeros.
Indeed, i want the field value of loginsonthishost because the accumulation is done in the script using a set of previous functions and ordering the resident load.
Here is a simpler code -
Load1:
load * inline
[data1, data2
a,1
b,1
c,-1
d,1
e,-1
b,1
b,-1
a,-1
a,2
a,3
a,4
a,5];
DingoLog:
LOAD *,
if ( Previous('data1')=data1,Previous('data3')+data2,data2) as data3
Resident Load1 Order by data1;
Why is this not giving me counts for data3?
Try to clear selection - you'll see numbers
After playing with it for some time, here is what seems to be working
Load1:
load * inline
[data1, data2
a,1
b,1
c,-1
d,1
e,-1
b,1
b,-1
a,-1
a,2
a,3
a,4
a,5];
DingoLog:
LOAD *,
if ( Peek(data1)=data1,Peek(data3)+data2,data2) as data3
Resident Load1 Order by data1,data2;
DROP Table Load1;
NOTE: There is some strange difference between peek and previous.