Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I need to get an hourly basis incremental record. I know hor to do an incremental load but the challange is i am unable to get make a table with an hourly count.
Time count
1Pm 200
2Pm 355
3Pm. 455
4Pm. 780.
I need to get the ablove data. Please help.
I am not sure what you want to achieve here.
Looks like you want to accumulate a counter grouped by a Time value, but then you are talking about incremental load,which IMHO is a different concept for a different requirement.
I assume you want to do an incremental load of your facts (that seems to work?) and create additionally a table with an accumulated count of the records. A solution might be to also handle this count table similar to the facts.
Load in your historic count table, get the last count and add the count of records for the incremental facts. Append the count to the historic count.
Ok. If i dont want to do an incremental laod and display the hourly record's in a table on a single load then how do i achieve it.
Something like
TMP:
LOAD Hour(YourTimestampField) as hour, Count(YourTimestampField) as count
RESIDENT YourFactTable
GROUP BY Hour(YourTimestampField);
RESULT:
LOAD hour, count, Rangesum(count, Peek(accumulated) ) as accumulated
RESIDENT TMP
ORDER BY hour;
DROP TABLE TMP;