Query Modifiers
Query modifiers are used to retrieve data that has been stored in the archive. They are used along with sampling and calculation modes to get a specific set of data.
If you want to use a query modifier, when you create or modify a query, in the Query Criteria String field, enter #, and then enter the query modifier. For example, if you want to retrieve only good data quality values, enter #ONLYGOOD.
Query Modifier | Results |
---|---|
ONLYGOOD |
The ONLYGOOD modifier excludes bad and uncertain
data quality values from retrieval and calculations. Although you can use this modifier with any sampling or calculation mode, it is most useful with raw and current Value queries. All the calculation modes such as minimum or average exclude bad values by default, so this modifier is not required with those cases. |
INCLUDEREPLACED |
Normally,when you query raw data, any values that have been
replaced with a different value for the same timestamp are not
returned. The This modifier is only useful with the rawbytime or rawbynumber retrieval. Do not use it with any other sampling or calculation mode. |
INCLUDEDELETED |
The INCLUDEDELETED modifier retrieves the value
that was previously deleted. Data that has been deleted from the
archiver is never actually removed but is marked as hidden. Use the
INCLUDEDELETED modifier to retrieve the values
that were deleted, in addition to the current values.This modifier is only useful with the rawbytime or rawbynumber retrieval. Do not use it with any other sampling or calculation mode. |
ONLYIFCONNECTED/ONLYIFUPTODATE |
The The bad data is not stored in the IHA file but is only returned
in the query. If the collector reconnects and flushes data and
you run the query again, the actual stored data is returned in
the following situations:
|
ONLYRAW | The ONLYRAW modifier retrieves only the raw samples. It does not add
interpolated or lab sampled values at the beginning of each interval
during calculated retrieval such as average, 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. Use this query modifier with calculation modes only, not with raw or sampled retrieval like interpolated modes. |
LABSAMPLING | The LABSAMPLING modifier affects the calculation modes that interpolate a
value at the start of each interval.Instead of using interpolation, lab sampling is used. When querying highly compressed data you may have intervals with no raw samples stored. For example, an average from 2 pm to 6 pm on a
one-hour interval will interpolate a value at 2 pm, 3 pm, 4 pm,
and 5 pm, and uses those in addition to any stored samples to
compute averages. When you specify |
INCLUDEBAD | Normally, when you query calculated data from Historian, only good data quality raw samples
are considered. INCLUDEBAD modifier includes bad
data quality values in calculations.You can use
|
FILTERINCLUDEBAD | Normally, while filtering, we use only good data quality values. When we use
FILTERINCLUDEBAD , the bad data quality values
are considered when filtering to determine time ranges. This query
modifier is not always recommended. |
USEMASTERFIELDTIME | The USEMASTERFIELDTIME query modifier is used only for the MultiField tags. It returns the value of all the fields at the same timestamp of the master field time, in each interval returned. |
HONORENDTIME | Normally, a query keeps searching through archives until the required number of samples has
been located, or until it gets to the first or last archive.
However, there are cases where you would want to specify a time
limit as well. For example, you may want to output the returned data
for a RawByNumber query in a trend page, in which
case there is no need to return data that would be offpage.If you
want to specify a time limit, provide an end time in your
|
EXAMINEFEW | Queries using calculation modes normally loop through every raw sample, between the given
start time and end time, to compute the calculated values. When
using Using this query modifier is recommended
when:
Use this query modifier only with
|