ONLYRAW

The ONLYRAW modifier retrieves only the raw stored samples. It does not add interpolated or lab sampled values at the beginning of each interval during calculated retrieval such as average or minimum or maximum.

Normally, a data query for minimum value will interpolate a value at the start of each interval and use that together with any raw samples to determine the minimum value in the interval. Interpolation is necessary because some intervals may not have any raw samples stored.

Note: Use the ONLYRAW modifier with Calculation modes only, not with raw or sampled retrieval like interpolated modes.
Example

Import this data to demonstrate the behavior of the ONLYRAW query modifier.

[Tags]
Tagname,DataType,HiEngineeringUnits,LoEngineeringUnits
RAMPUP,SingleFloat,100,0
[Data]
Tagname,TimeStamp,Value,DataQuality
RAMPUP,06-Aug-2012 9:01:00.000,1,Good
RAMPUP,06-Aug-2012 9:02:00.000,2,Good
RAMPUP,06-Aug-2012 9:03:00.000,3,Good
RAMPUP,06-Aug-2012 9:04:00.000,4,Good
RAMPUP,06-Aug-2012 9:05:00.000,5,Good
RAMPUP,06-Aug-2012 9:06:00.000,6,Good

When you query the minimum without any modifier, you see that the minimum value may not be one of the stored values.

set starttime='06-Aug-2012 09:02:30',endtime='06-Aug-2012 09:05:30' 
select timestamp,value,quality
from ihrawdata
where tagname = RAMPUP and samplingmode=Calculated and CalculationMode=minimum and numberofsamples=3
Time StampValueQuality
8/6/2012 09:03:302.500000000000100.0000000
8/6/2012 09:04:30 3.500000000000100.0000000
8/6/2012 09:05:304,500000000000100.0000000
set starttime='06-Aug-2012 09:02:30',endtime='06-Aug-2012 09:05:30' 
select timestamp,value,quality
from ihrawdata
where tagname = RAMPUP and samplingmode=Calculated and CalculationMode=minimum and numberofsamples=3 
and criteriastring='#onlyraw'
Time StampValueQuality
8/6/2012 09:03:303.000000000000100.0000000
8/6/2012 09:04:30 4.000000000000100.0000000
8/6/2012 09:05:305.000000000000100.0000000
Anticipated Usage

Use the ONLYRAW modifier to query the minimum and maximum values of stored data samples, similar to the RawAverage Calculation mode. A minimum or maximum of raw samples is more like doing a MIN() or MAX () in an Excel spreadsheet. Realize that if you use the ONLYRAW modifier, there may be intervals with no raw samples. The ONLYRAW modifier is useful for Calculation modes and not the Sampling modes.