I'm rebuilding the reporting database after completing upgrade from 7.5 to 8.1 update 1 according to the following documentation:
After a while of clicking on "Start" button on sitecore/admin/RebuildReportingDB.aspx the rebuild completed,
My issue that I'm using custom aggregator processors to pull data from MongoDB and add these data to custom SQL tables in the reporting database and when checking these tables they have data less than the data in the primary reporting database.
I checked the log files and there are no errors related, Is there any setting that should be added, Is there a time interval that should be set other than the time interval for clearing secondary database tables?
Following are more details:
I'm tracing page events like click on a banner rendering, this is saved to MongoDB, then I'm using the following to get these data into SQL:
public class PageEventProcessor : AggregationProcessor
{
protected override void OnProcess(AggregationPipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
try
{
var fact = args.GetFact<PageEvent>();
foreach (var page in args.Context.Visit.Pages)
{
foreach (var pEvent in page.PageEvents)
{
var eventkey = new PageEventKey
{
EventId = pEvent.PageEventDefinitionId,
Date = args.DateTimeStrategy.Translate(pEvent.DateTime),
ItemId = pEvent.ItemId,
PageId = page.Item.Id
};
var eventValue = new PageEventValue
{
Count = 1
};
fact.Emit(eventkey, eventValue);
}
}
}
catch (Exception ex)
{
Log.Error("Error in PageEventProcessor.OnProcess", ex, this);
}
Log.Info("PageEventProcessor.OnProcess - end", this);
}
Following are the table schema in SQL:
CREATE TABLE [dbo].[Fact_PageEvent](
[Date] [smalldatetime] NOT NULL,
[EventId] [uniqueidentifier] NOT NULL,
[PageId] [uniqueidentifier] NOT NULL,
[ItemId] [uniqueidentifier] NOT NULL,
[Count] [int] NOT NULL)
In addition in the secondary database table I have 181 record while in the old database I have more thank 16000 record!