get_interpolated_asset_property_values
async
¶
get_interpolated_asset_property_values(
start_time_in_seconds: TimeInSeconds,
end_time_in_seconds: TimeInSeconds,
quality: Quality,
interval_in_seconds: IntervalInSeconds,
type: InterpolationType,
*,
config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
asset_id: Optional[ID] = None,
property_id: Optional[ID] = None,
property_alias: Optional[AssetPropertyAlias] = None,
start_time_offset_in_nanos: Optional[OffsetInNanos] = None,
end_time_offset_in_nanos: Optional[OffsetInNanos] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxInterpolatedResults] = None,
interval_window_in_seconds: Optional[IntervalWindowInSeconds] = None,
) -> GetInterpolatedAssetPropertyValuesResponse
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
assetIdandpropertyIdof 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:
-
asset_id(Optional[ID], default:None) –The ID of the asset, in UUID format.
-
property_id(Optional[ID], default:None) –The ID of the asset property, in UUID format.
-
property_alias(Optional[AssetPropertyAlias], default:None) –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. -
start_time_in_seconds(TimeInSeconds) –The exclusive start of the range from which to interpolate data, expressed in seconds in Unix epoch time.
-
start_time_offset_in_nanos(Optional[OffsetInNanos], default:None) –The nanosecond offset converted from
startTimeInSeconds. -
end_time_in_seconds(TimeInSeconds) –The inclusive end of the range from which to interpolate data, expressed in seconds in Unix epoch time.
-
end_time_offset_in_nanos(Optional[OffsetInNanos], default:None) –The nanosecond offset converted from
endTimeInSeconds. -
quality(Quality) –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.
-
interval_in_seconds(IntervalInSeconds) –The time interval in seconds over which to interpolate data. Each interval starts when the previous one ends.
-
next_token(Optional[NextToken], default:None) –The token to be used for the next set of paginated results.
-
max_results(Optional[MaxInterpolatedResults], default:None) –The maximum number of results to return for each paginated request. If not specified, the default value is 10.
-
type(InterpolationType) –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 interpolationIf 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.
-
-
interval_window_in_seconds(Optional[IntervalWindowInSeconds], default:None) –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
intervalWindowInSecondsparameter, the value for thetypeparameter must beLINEAR_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.
-
Raises:
-
InternalFailureException–IoT SiteWise can't process your request right now. Try again later.
-
InvalidRequestException–The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.
-
ResourceNotFoundException–The requested resource can't be found.
-
ServiceUnavailableException–The requested service is unavailable.
-
ThrottlingException–Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.
For more information, see Quotas in the IoT SiteWise User Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 | |