Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have aggregated count per request what i want is to create range as per the count
Expected Output:
Request Count Range
1 104 101-200
2 207 201-300
3 304 301-400
4 403 401-500
I can achieve this with interval match but with a synthetic key .
I wish to get rid of this synthetic key
Please find the attached file .
Thanks,
Nishant N
Not sure why you want to get rid of the synthetic key here. If you read HIC's blog here -> IntervalMatch, you would see that this synthetic is not a bad thing to have here
If you still think you need to remove it, you can join the IntervalMatch table to one of your tables above to combine the tables into one.
Range:
load * inline
[
Count_Min ,Count_Max,Range
101,200, 101-200
201,300, 201-300
301,400,301-400
401,500,401-500
501,600,501-600
];
ScoreDetails:
load * inline
[
Count , Request
107, 1
207, 2
307, 3
406, 4
307,5
];
left join(ScoreDetails)
IntervalMatch(Count) load
Count_Min ,Count_Max
Resident Range;
drop Table Range;
Another option:
Range:
LOAD Count_Min + IterNo() - 1 as Count,
*
While Count_Min + IterNo() - 1 <= Count_Max;
LOAD* Inline [
Count_Min ,Count_Max,Range
101,200, 101-200
201,300, 201-300
301,400,301-400
401,500,401-500
501,600,501-600
];
ScoreDetails:
Right Keep (Range)
LOAD * Inline [
Count , Request
107, 1
207, 2
307, 3
406, 4
307,5
];
Hi,
Please edit your script and write this"Drop Table Range; "
Range:
load * inline
[
Count_Min ,Count_Max,Range
101,200, 101-200
201,300, 201-300
301,400,301-400
401,500,401-500
501,600,501-600
];
ScoreDetails:
load * inline
[
Count , Request
107, 1
207, 2
307, 3
406, 4
307,5
];
IntervalMatch(Count) load
Count_Min ,Count_Max
Resident Range;
Drop Table Range;
if i drop the table Range. i wouldnt be able to use the Range Field.
What if i want to use the Range field as well?\
Rgds
Jim
Exactly Jim, I need to use Range field as a dimension
Thanks and Regards,
Nishant Nadkarni