# TransformProperty

Struct · External

Contains an asset transform property.

A transform is a one-to-one mapping of a property's data points from one form to another. For example, you can use a transform to convert a Celsius data stream to Fahrenheit by applying the transformation expression to each data point of the Celsius stream. A transform can only have a data type of `DOUBLE` and consume properties with data types of `INTEGER` or `DOUBLE` .

For more information, see [Transforms](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#transforms) in the *AWS IoT SiteWise User Guide* .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotsitewise as iotsitewise } from 'aws-cdk-lib';
const transformProperty: iotsitewise.CfnAssetModel.TransformProperty = {
  expression: 'expression',
  variables: [{
    name: 'name',
    value: {
      hierarchyExternalId: 'hierarchyExternalId',
      hierarchyId: 'hierarchyId',
      hierarchyLogicalId: 'hierarchyLogicalId',
      propertyExternalId: 'propertyExternalId',
      propertyId: 'propertyId',
      propertyLogicalId: 'propertyLogicalId',
      propertyPath: [{
        name: 'name',
      }],
    },
  }],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iotsitewise as iotsitewise

transform_property = iotsitewise.CfnAssetModel.TransformProperty(
    expression="expression",
    variables=[iotsitewise.CfnAssetModel.ExpressionVariableProperty(
        name="name",
        value=iotsitewise.CfnAssetModel.VariableValueProperty(
            hierarchy_external_id="hierarchyExternalId",
            hierarchy_id="hierarchyId",
            hierarchy_logical_id="hierarchyLogicalId",
            property_external_id="propertyExternalId",
            property_id="propertyId",
            property_logical_id="propertyLogicalId",
            property_path=[iotsitewise.CfnAssetModel.PropertyPathDefinitionProperty(
                name="name"
            )]
        )
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iotsitewise.*;

TransformProperty transformProperty = TransformProperty.builder()
        .expression("expression")
        .variables(List.of(ExpressionVariableProperty.builder()
                .name("name")
                .value(VariableValueProperty.builder()
                        .hierarchyExternalId("hierarchyExternalId")
                        .hierarchyId("hierarchyId")
                        .hierarchyLogicalId("hierarchyLogicalId")
                        .propertyExternalId("propertyExternalId")
                        .propertyId("propertyId")
                        .propertyLogicalId("propertyLogicalId")
                        .propertyPath(List.of(PropertyPathDefinitionProperty.builder()
                                .name("name")
                                .build()))
                        .build())
                .build()))
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoTSiteWise;

var transformProperty = new TransformProperty {
    Expression = "expression",
    Variables = new [] { new ExpressionVariableProperty {
        Name = "name",
        Value = new VariableValueProperty {
            HierarchyExternalId = "hierarchyExternalId",
            HierarchyId = "hierarchyId",
            HierarchyLogicalId = "hierarchyLogicalId",
            PropertyExternalId = "propertyExternalId",
            PropertyId = "propertyId",
            PropertyLogicalId = "propertyLogicalId",
            PropertyPath = new [] { new PropertyPathDefinitionProperty {
                Name = "name"
            } }
        }
    } }
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

transformProperty := &TransformProperty{
	Expression: jsii.String("expression"),
	Variables: []interface{}{
		&ExpressionVariableProperty{
			Name: jsii.String("name"),
			Value: &VariableValueProperty{
				HierarchyExternalId: jsii.String("hierarchyExternalId"),
				HierarchyId: jsii.String("hierarchyId"),
				HierarchyLogicalId: jsii.String("hierarchyLogicalId"),
				PropertyExternalId: jsii.String("propertyExternalId"),
				PropertyId: jsii.String("propertyId"),
				PropertyLogicalId: jsii.String("propertyLogicalId"),
				PropertyPath: []interface{}{
					&PropertyPathDefinitionProperty{
						Name: jsii.String("name"),
					},
				},
			},
		},
	},
}
```

## Properties

- `expression`: string (required) — The mathematical expression that defines the transformation function.

  You can specify up to 10 variables per expression. You can specify up to 10 functions per expression.

  For more information, see [Quotas](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html) in the *AWS IoT SiteWise User Guide* .

- `variables`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAssetModel.ExpressionVariableProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotsitewise.CfnAssetModel.ExpressionVariableProperty.html)[] (required) — The list of variables used in the expression.
