Client applications can request that data be retrieved from the historical data server in several ways, including:
In either type of request, a time span, ultimately resolved as a start time and an end time, is specified in the request to establish the time boundaries for the request. Time stamps that exactly match the start time are considered within the time span. Time stamps that exactly match the end time are not within the time span.
Start and end times from a client application will often not exactly hit the time stamps for raw samples stored in the historical data server, so the following options exist for specifying how the server should handle the boundary sample situations:
A complicating factor for historical data retrieval is that there may be discontinuities (holes) in the historical data record. Reading raw samples should return hole start samples that indicate the starting time and the reason for the hole; for example, the parameter cannot be read, the historian shut down, the tag was not configured to collect at that time, etc. Reading processed data should return sufficient information to let the client know if the requested aggregate was adversely affected by any holes in the historical data record within each subinterval.
Another kind of discontinuity in the historical data record involves requesting historical data for time spans up to and including the present. It is usually convenient for clients if the historical data server would, in this case, return a raw history sample representing what the historical data server currently considers now. It is expected that a client repeating the same request for a now sample some time later would see different, more current, results.