By default, Flow will mange your calendar automatically based on the configuration properties set in the calendar's configuration. Flow will use the Gregorian calendar to generate time buckets for the different interval type like hours, days weeks ect.
In some rare cases KPIs and production numbers might be required to follow a different calendar configuration like a month must always have 30 days or some mining operations combine the month of February and March as one month.
In this case, a custom calendar is required. Calendars can be configured to be managed externally to cater for these non-standard time periods:
The responsibility to create time buckets are now up the the end user. A stored Procedure is available to run against the Flow database to trigger and create these custom time buckets.
The following parameters must be supplied to the stored procedure:
- CalendarName - Data type VARCHAR(200)
- Name of your custom calander as added in the calander section of the Flow Toolbox
- IntervalType - Data type VARCHAR(10)
- What is the interval of the time bucket that you need to create? Valid parameters to pass include: "Minutely", "Hourly", "Shiftly", "Daily", "Weekly", "Monthly", "Quarterly", "Yearly"
- PeriodStart - Data type DATETIME2
- Start time of the interval
- PeriodEnd - Data type DATETIME2
- End Time of the interval. This must be greater than the supplied PeriodStart
- LocalTime - Data type BIT = 1
- Is the time supplied in the PeriodStart and PeriodEnd parameters local time or UTC time? If this parameter is true, it means that the time supplied is local time.