Problem with the trigger of Analytics

we have a problem with analytic. We defined the following DFE:

@DFE(period='QUARTER_HOUR', grain='QUARTER_HOUR', metric='SensorAlarm')
type SensorAlarm mixes TSDataFlowEvent<PointPhysicalMeasurementSeries>

type SensorAlarmTriggered mixes CompoundDataFlowEvent<PointPhysicalMeasurementSeries> {
  value : SensorAlarm

type SensorAlarmTriggeredAnalytic mixes Analytic<SensorAlarmTriggered, Void> {  
  process : ~ js server

If I add a value today at 08:00 I saw that the analytic is triggered ONLY ONE TIME with start end equal to :
start = yesterday at 23.45
end = today at 00.00

When we did a refreshAnalytics

	ids: ["MS_ID"], 
	start: "2019-05-20", 
    end: "2019-05-21T08:00:00.000",
    analyticWhitelist: ["SensorAlarmTriggeredAnalytic"], 
    batchSize: 1

we saw that the system triggers the analytic correctly, i.e with intervals of QUARTER HOUR from the start to the end passed to the refresh function.

What can be the reason for this different behavior?


When you added a value for one data point, only that quarter_Hour ( not including today) would be invalidated, assuming your metric is not doing any windows/rollups etc.
By default, enddate is start of today.

@pavan.nandikonda Do you know how we can change the end date default setting ?

I have looked at the Ann.DFE and it seems that it is set by the “period”. Here the period is set to 15 minutes (QUARTER_HOUR) so if we receive a data at 8am today, the startdate and enddate should be 7:45am 8:15am and not yesterday 11:45pm - today 00:00.

Should Laura use only a granularity equal or bigger than a day in “Period” ? As I remember in the LightBulb project we had an hour as a period.

c3ShowType(AnalyticsContainer) has more info on TenantConfig.

try with TenantConfig.putConfig(“ACE-EndOfTime”, 1) .