Skip to content

aws.iotsitewise.get_interpolated_asset_property_values

Example SQL Queries

SELECT * FROM
aws.iotsitewise.get_interpolated_asset_property_values
WHERE
"start_time_in_seconds" = 'VALUE'
AND "end_time_in_seconds" = 'VALUE'
AND "quality" = 'VALUE'
AND "interval_in_seconds" = 'VALUE'
AND "type" = 'VALUE';

Description

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.

Table Definition

Column NameColumn Data Type
end_time_in_seconds Required Input Column

The inclusive end of the range from which to interpolate data, expressed in seconds in Unix epoch time.

BIGINT
interval_in_seconds Required Input Column

The time interval in seconds over which to interpolate data. Each interval starts when the previous one ends.

BIGINT
quality Required Input Column

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.

VARCHAR
start_time_in_seconds Required Input Column

The exclusive start of the range from which to interpolate data, expressed in seconds in Unix epoch time.

BIGINT
type Required Input Column

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.

VARCHAR
asset_id Input Column

The ID of the asset, in UUID format.

VARCHAR
end_time_offset_in_nanos Input Column

The nanosecond offset converted from endTimeInSeconds.

BIGINT
interval_window_in_seconds Input Column

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.

BIGINT
property_alias Input Column

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.

VARCHAR
property_id Input Column

The ID of the asset property, in UUID format.

VARCHAR
start_time_offset_in_nanos Input Column

The nanosecond offset converted from startTimeInSeconds.

BIGINT
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
timestamp

Contains a timestamp with optional nanosecond granularity.

STRUCT(
"time_in_seconds" BIGINT,
"offset_in_nanos" BIGINT
)
Show child fields
timestamp.offset_in_nanos

The nanosecond offset from timeInSeconds.

timestamp.time_in_seconds

The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

value

Contains an asset property value (of a single type only).

STRUCT(
"string_value" VARCHAR,
"integer_value" BIGINT,
"double_value" DOUBLE,
"boolean_value" BOOLEAN
)
Show child fields
value.boolean_value

Asset property data of type Boolean (true or false).

value.double_value

Asset property data of type double (floating point number).

value.integer_value

Asset property data of type integer (whole number).

value.string_value

Asset property data of type string (sequence of characters).