Skip to content

aws.iottwinmaker.get_property_value_history

Example SQL Queries

SELECT * FROM
aws.iottwinmaker.get_property_value_history
WHERE
"workspace_id" = 'VALUE'
AND "selected_properties" = 'VALUE';

Description

Retrieves information about the history of a time series property value for a component, component type, entity, or workspace.

You must specify a value for workspaceId. For entity-specific queries, specify values for componentName and entityId. For cross-entity quries, specify a value for componentTypeId.

Table Definition

Column NameColumn Data Type
selected_properties Required Input Column

A list of properties whose value histories the request retrieves.

VARCHAR[]
Show child fields
selected_properties[]
workspace_id Required Input Column

The ID of the workspace.

VARCHAR
component_name Input Column

The name of the component.

VARCHAR
component_path Input Column

This string specifies the path to the composite component, starting from the top-level component.

VARCHAR
component_type_id Input Column

The ID of the component type.

VARCHAR
end_date_time Input Column

The date and time of the latest property value to return.

TIMESTAMP_S
end_time Input Column

The ISO8601 DateTime of the latest property value to return.

For more information about the ISO8601 DateTime format, see the data type PropertyValue.

VARCHAR
entity_id Input Column

The ID of the entity.

VARCHAR
interpolation Input Column

An object that specifies the interpolation type and the interval over which to interpolate data.

STRUCT(
"interpolation_type" VARCHAR,
"interval_in_seconds" BIGINT
)
Show child fields
interpolation.interpolation_type

The interpolation type.

interpolation.interval_in_seconds

The interpolation time interval in seconds.

max_results Input Column

The maximum number of results to return at one time. The default is 25.

Valid Range: Minimum value of 1. Maximum value of 250.

BIGINT
next_token Input Column

The string that specifies the next page of results.

VARCHAR
order_by_time Input Column

The time direction to use in the result order.

VARCHAR
property_filters Input Column

A list of objects that filter the property value history request.

STRUCT(
"property_name" VARCHAR,
"operator" VARCHAR,
"value" STRUCT(
"boolean_value" BOOLEAN,
"double_value" DOUBLE,
"integer_value" BIGINT,
"long_value" BIGINT,
"string_value" VARCHAR,
"relationship_value" STRUCT(
"target_entity_id" VARCHAR,
"target_component_name" VARCHAR
),
"expression" VARCHAR
)
)[]
Show child fields
property_filters[]
Show child fields
property_filters[].operator

The operator associated with this property filter.

property_filters[].property_name

The property name associated with this property filter.

property_filters[].value

The value associated with this property filter.

Show child fields
property_filters[].value.boolean_value

A Boolean value.

property_filters[].value.double_value

A double value.

property_filters[].value.expression

An expression that produces the value.

property_filters[].value.integer_value

An integer value.

property_filters[].value.long_value

A long value.

property_filters[].value.relationship_value

A value that relates a component to another component.

Show child fields
property_filters[].value.relationship_value.target_component_name

The name of the target component associated with the relationship value.

property_filters[].value.relationship_value.target_entity_id

The ID of the target entity associated with this relationship value.

property_filters[].value.string_value

A string value.

start_date_time Input Column

The date and time of the earliest property value to return.

TIMESTAMP_S
start_time Input Column

The ISO8601 DateTime of the earliest property value to return.

For more information about the ISO8601 DateTime format, see the data type PropertyValue.

VARCHAR
_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
property_values

An object that maps strings to the property definitions in the component type. Each string in the mapping must be unique to this object.

STRUCT(
"entity_property_reference" STRUCT(
"component_name" VARCHAR,
"component_path" VARCHAR,
"external_id_property" MAP(VARCHAR, VARCHAR),
"entity_id" VARCHAR,
"property_name" VARCHAR
),
"values" STRUCT(
"timestamp" TIMESTAMP_S,
"value" STRUCT(
"boolean_value" BOOLEAN,
"double_value" DOUBLE,
"integer_value" BIGINT,
"long_value" BIGINT,
"string_value" VARCHAR,
"relationship_value" STRUCT(
"target_entity_id" VARCHAR,
"target_component_name" VARCHAR
),
"expression" VARCHAR
),
"time" VARCHAR
)[]
)[]
Show child fields
property_values[]
Show child fields
property_values[].entity_property_reference

An object that uniquely identifies an entity property.

Show child fields
property_values[].entity_property_reference.component_name

The name of the component.

property_values[].entity_property_reference.component_path

This string specifies the path to the composite component, starting from the top-level component.

property_values[].entity_property_reference.entity_id

The ID of the entity.

property_values[].entity_property_reference.external_id_property

A mapping of external IDs to property names. External IDs uniquely identify properties from external data stores.

property_values[].entity_property_reference.property_name

The name of the property.

property_values[].values[]
Show child fields
property_values[].values[].time

ISO8601 DateTime of a value for a time series property.

The time for when the property value was recorded in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.SSSSSSSSS][Z/±HH:mm].

  • [YYYY]: year

  • [MM]: month

  • [DD]: day

  • [hh]: hour

  • [mm]: minute

  • [ss]: seconds

  • [.SSSSSSSSS]: additional precision, where precedence is maintained. For example: [.573123] is equal to 573123000 nanoseconds.

  • Z: default timezone UTC

  • ± HH:mm: time zone offset in Hours and Minutes.

Required sub-fields: YYYY-MM-DDThh:mm:ss and [Z/±HH:mm]

property_values[].values[].timestamp

The timestamp of a value for a time series property.

property_values[].values[].value

An object that specifies a value for a time series property.

Show child fields
property_values[].values[].value.boolean_value

A Boolean value.

property_values[].values[].value.double_value

A double value.

property_values[].values[].value.expression

An expression that produces the value.

property_values[].values[].value.integer_value

An integer value.

property_values[].values[].value.long_value

A long value.

property_values[].values[].value.relationship_value

A value that relates a component to another component.

Show child fields
property_values[].values[].value.relationship_value.target_component_name

The name of the target component associated with the relationship value.

property_values[].values[].value.relationship_value.target_entity_id

The ID of the target entity associated with this relationship value.

property_values[].values[].value.string_value

A string value.