# MixedMeasureMappingProperty

MixedMeasureMappings are mappings that can be used to ingest data into a mixture of narrow and multi measures in the derived table.

- 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_timestream as timestream } from 'aws-cdk-lib';
const mixedMeasureMappingProperty: timestream.CfnScheduledQuery.MixedMeasureMappingProperty = {
  measureValueType: 'measureValueType',

  // the properties below are optional
  measureName: 'measureName',
  multiMeasureAttributeMappings: [{
    measureValueType: 'measureValueType',
    sourceColumn: 'sourceColumn',

    // the properties below are optional
    targetMultiMeasureAttributeName: 'targetMultiMeasureAttributeName',
  }],
  sourceColumn: 'sourceColumn',
  targetMeasureName: 'targetMeasureName',
};
```

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_timestream as timestream

mixed_measure_mapping_property = timestream.CfnScheduledQuery.MixedMeasureMappingProperty(
    measure_value_type="measureValueType",

    # the properties below are optional
    measure_name="measureName",
    multi_measure_attribute_mappings=[timestream.CfnScheduledQuery.MultiMeasureAttributeMappingProperty(
        measure_value_type="measureValueType",
        source_column="sourceColumn",

        # the properties below are optional
        target_multi_measure_attribute_name="targetMultiMeasureAttributeName"
    )],
    source_column="sourceColumn",
    target_measure_name="targetMeasureName"
)
```

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.timestream.*;

MixedMeasureMappingProperty mixedMeasureMappingProperty = MixedMeasureMappingProperty.builder()
        .measureValueType("measureValueType")

        // the properties below are optional
        .measureName("measureName")
        .multiMeasureAttributeMappings(List.of(MultiMeasureAttributeMappingProperty.builder()
                .measureValueType("measureValueType")
                .sourceColumn("sourceColumn")

                // the properties below are optional
                .targetMultiMeasureAttributeName("targetMultiMeasureAttributeName")
                .build()))
        .sourceColumn("sourceColumn")
        .targetMeasureName("targetMeasureName")
        .build();
```

C# / .NET:

```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.Timestream;

var mixedMeasureMappingProperty = new MixedMeasureMappingProperty {
    MeasureValueType = "measureValueType",

    // the properties below are optional
    MeasureName = "measureName",
    MultiMeasureAttributeMappings = new [] { new MultiMeasureAttributeMappingProperty {
        MeasureValueType = "measureValueType",
        SourceColumn = "sourceColumn",

        // the properties below are optional
        TargetMultiMeasureAttributeName = "targetMultiMeasureAttributeName"
    } },
    SourceColumn = "sourceColumn",
    TargetMeasureName = "targetMeasureName"
};
```

Golang:

```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"

mixedMeasureMappingProperty := &MixedMeasureMappingProperty{
	MeasureValueType: jsii.String("measureValueType"),

	// the properties below are optional
	MeasureName: jsii.String("measureName"),
	MultiMeasureAttributeMappings: []interface{}{
		&MultiMeasureAttributeMappingProperty{
			MeasureValueType: jsii.String("measureValueType"),
			SourceColumn: jsii.String("sourceColumn"),

			// the properties below are optional
			TargetMultiMeasureAttributeName: jsii.String("targetMultiMeasureAttributeName"),
		},
	},
	SourceColumn: jsii.String("sourceColumn"),
	TargetMeasureName: jsii.String("targetMeasureName"),
}
```

## Properties

- `measureName`: string — Refers to the value of measure_name in a result row.

  This field is required if MeasureNameColumn is provided.

- `measureValueType`: string (required) — Type of the value that is to be read from sourceColumn.

  If the mapping is for MULTI, use MeasureValueType.MULTI.

- `multiMeasureAttributeMappings`: [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) | [CfnScheduledQuery.MultiMeasureAttributeMappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_timestream.CfnScheduledQuery.MultiMeasureAttributeMappingProperty.html)[] — Required when measureValueType is MULTI.

  Attribute mappings for MULTI value measures.

- `sourceColumn`: string — This field refers to the source column from which measure-value is to be read for result materialization.

- `targetMeasureName`: string — Target measure name to be used.

  If not provided, the target measure name by default would be measure-name if provided, or sourceColumn otherwise.
