interpolated_asset_property_values
Creates, updates, deletes, gets or lists an interpolated_asset_property_values resource.
Overview
| Name | interpolated_asset_property_values |
| Type | Resource |
| Id | aws.iotsitewise.interpolated_asset_property_values |
Fields
The following fields are returned by SELECT queries:
- get_interpolated_asset_property_values
| Name | Datatype | Description |
|---|---|---|
timestamp | object | Contains a timestamp with optional nanosecond granularity. |
value | object | Contains an asset property value (of a single type only). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_interpolated_asset_property_values | select | startTimeInSeconds, endTimeInSeconds, quality, intervalInSeconds, type, region | assetId, propertyId, propertyAlias, startTimeOffsetInNanos, endTimeOffsetInNanos, nextToken, maxResults, intervalWindowInSeconds | Get interpolated values for an asset property for a specified time interval, during a period of time. If your time series is missing data points during the specified time interval, you can use interpolation to estimate the missing data. For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. 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. |
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.
| Name | Datatype | Description |
|---|---|---|
endTimeInSeconds | integer (int64) | The inclusive end of the range from which to interpolate data, expressed in seconds in Unix epoch time. |
intervalInSeconds | integer (int64) | The time interval in seconds over which to interpolate data. Each interval starts when the previous one ends. |
quality | string | The quality of the asset property value. You can use this parameter as a filter to choose only the asset property values that have a specific quality. |
region | string | AWS region (default: us-east-1) |
startTimeInSeconds | integer (int64) | The exclusive start of the range from which to interpolate data, expressed in seconds in Unix epoch time. |
type | string | The interpolation type. Valid values: LINEAR_INTERPOLATION | LOCF_INTERPOLATION LINEAR_INTERPOLATION – Estimates missing data using linear interpolation. For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated value on July 2, 2021, at 9 AM, the second interpolated value on July 3, 2021, at 9 AM, and so on. LOCF_INTERPOLATION – Estimates missing data using last observation carried forward interpolation If no data point is found for an interval, IoT SiteWise returns the last observed data point for the previous interval and carries forward this interpolated value until a new data point is found. For example, you can get the state of an on-off valve every 24 hours over a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the last observed data point between July 1, 2021, at 9 AM and July 2, 2021, at 9 AM as the first interpolated value. If a data point isn't found after 9 AM on July 2, 2021, IoT SiteWise uses the same interpolated value for the rest of the days. |
assetId | string | The ID of the asset, in UUID format. |
endTimeOffsetInNanos | integer | The nanosecond offset converted from endTimeInSeconds. |
intervalWindowInSeconds | integer (int64) | The query interval for the window, in seconds. IoT SiteWise computes each interpolated value by using data points from the timestamp of each interval, minus the window to the timestamp of each interval plus the window. If not specified, the window ranges between the start time minus the interval and the end time plus the interval. If you specify a value for the intervalWindowInSeconds parameter, the value for the type parameter must be LINEAR_INTERPOLATION. If a data point isn't found during the specified query window, IoT SiteWise won't return an interpolated value for the interval. This indicates that there's a gap in the ingested data points. For example, you can get the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts on July 1, 2021, at 9 AM with a window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 2, 2021 to compute the first interpolated value. Next, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 3, 2021 to compute the second interpolated value, and so on. |
maxResults | integer | The maximum number of results to return for each paginated request. If not specified, the default value is 10. |
nextToken | string | The token to be used for the next set of paginated results. |
propertyAlias | string | The 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. |
propertyId | string | The ID of the asset property, in UUID format. |
startTimeOffsetInNanos | integer | The nanosecond offset converted from startTimeInSeconds. |
SELECT examples
- get_interpolated_asset_property_values
Get interpolated values for an asset property for a specified time interval, during a period of time. If your time series is missing data points during the specified time interval, you can use interpolation to estimate the missing data. For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. 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
timestamp,
value
FROM aws.iotsitewise.interpolated_asset_property_values
WHERE startTimeInSeconds = '{{ startTimeInSeconds }}' -- required
AND endTimeInSeconds = '{{ endTimeInSeconds }}' -- required
AND quality = '{{ quality }}' -- required
AND intervalInSeconds = '{{ intervalInSeconds }}' -- required
AND type = '{{ type }}' -- required
AND region = '{{ region }}' -- required
AND assetId = '{{ assetId }}'
AND propertyId = '{{ propertyId }}'
AND propertyAlias = '{{ propertyAlias }}'
AND startTimeOffsetInNanos = '{{ startTimeOffsetInNanos }}'
AND endTimeOffsetInNanos = '{{ endTimeOffsetInNanos }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND intervalWindowInSeconds = '{{ intervalWindowInSeconds }}'
;