Skip to main content

asset_property_aggregates

Creates, updates, deletes, gets or lists an asset_property_aggregates resource.

Overview

Nameasset_property_aggregates
TypeResource
Idaws.iotsitewise.asset_property_aggregates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
qualitystringThe quality of the aggregated data. (GOOD, BAD, UNCERTAIN)
timestampstring (date-time)The date the aggregating computations occurred, in Unix epoch time.
valueobjectThe value of the aggregates.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_asset_property_aggregatesselectaggregateTypes, resolution, startDate, endDate, regionassetId, propertyId, propertyAlias, qualities, timeOrdering, nextToken, maxResultsGets aggregated values for an asset property. For more information, see Querying aggregates in the IoT SiteWise User Guide. To identify an asset property, you must specify one of the following: The assetId and propertyId of an asset property. A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.
batch_get_asset_property_aggregatesselectregionGets aggregated values (for example, average, minimum, and maximum) for one or more asset properties. For more information, see Querying aggregates in the IoT SiteWise User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
aggregateTypesarrayThe data aggregating function.
endDatestring (date-time)The inclusive end of the range from which to query historical data, expressed in seconds in Unix epoch time.
regionstringAWS region (default: us-east-1)
resolutionstringThe time interval over which to aggregate data.
startDatestring (date-time)The exclusive start of the range from which to query historical data, expressed in seconds in Unix epoch time.
assetIdstringThe ID of the asset, in UUID format.
maxResultsintegerThe maximum number of results to return for each paginated request. A result set is returned in the two cases, whichever occurs first. The size of the result set is equal to 1 MB. The number of data points in the result set is equal to the value of maxResults. The maximum value of maxResults is 2500.
nextTokenstringThe token to be used for the next set of paginated results.
propertyAliasstringThe alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.
propertyIdstringThe ID of the asset property, in UUID format.
qualitiesarrayThe quality by which to filter asset data.
timeOrderingstringThe chronological sorting order of the requested information. Default: ASCENDING

SELECT examples

Gets aggregated values for an asset property. For more information, see Querying aggregates in the IoT SiteWise User Guide. To identify an asset property, you must specify one of the following: The assetId and propertyId of an asset property. A propertyAlias, which is a data stream alias (for example, /company/windfarm/3/turbine/7/temperature). To define an asset property's alias, see UpdateAssetProperty.

SELECT
quality,
timestamp,
value
FROM aws.iotsitewise.asset_property_aggregates
WHERE aggregateTypes = '{{ aggregateTypes }}' -- required
AND resolution = '{{ resolution }}' -- required
AND startDate = '{{ startDate }}' -- required
AND endDate = '{{ endDate }}' -- required
AND region = '{{ region }}' -- required
AND assetId = '{{ assetId }}'
AND propertyId = '{{ propertyId }}'
AND propertyAlias = '{{ propertyAlias }}'
AND qualities = '{{ qualities }}'
AND timeOrdering = '{{ timeOrdering }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;