Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

incremental load on hourly basis

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.

3 Replies
swuehl
MVP
MVP

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.

Not applicable
Author

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.

swuehl
MVP
MVP

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;