# AnalysisRuleAggregationProperty

A type of analysis rule that enables query structure and specified queries that produce aggregate statistics.

- Source: Generated at build time
- Type last changed: v2.154.0 · 22 Aug 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cleanrooms as cleanrooms } from 'aws-cdk-lib';
const analysisRuleAggregationProperty: cleanrooms.CfnConfiguredTable.AnalysisRuleAggregationProperty = {
  aggregateColumns: [{
    columnNames: ['columnNames'],
    function: 'function',
  }],
  dimensionColumns: ['dimensionColumns'],
  joinColumns: ['joinColumns'],
  outputConstraints: [{
    columnName: 'columnName',
    minimum: 123,
    type: 'type',
  }],
  scalarFunctions: ['scalarFunctions'],

  // the properties below are optional
  additionalAnalyses: 'additionalAnalyses',
  allowedJoinOperators: ['allowedJoinOperators'],
  joinRequired: 'joinRequired',
};
```

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_cleanrooms as cleanrooms

analysis_rule_aggregation_property = cleanrooms.CfnConfiguredTable.AnalysisRuleAggregationProperty(
    aggregate_columns=[cleanrooms.CfnConfiguredTable.AggregateColumnProperty(
        column_names=["columnNames"],
        function="function"
    )],
    dimension_columns=["dimensionColumns"],
    join_columns=["joinColumns"],
    output_constraints=[cleanrooms.CfnConfiguredTable.AggregationConstraintProperty(
        column_name="columnName",
        minimum=123,
        type="type"
    )],
    scalar_functions=["scalarFunctions"],

    # the properties below are optional
    additional_analyses="additionalAnalyses",
    allowed_join_operators=["allowedJoinOperators"],
    join_required="joinRequired"
)
```

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

AnalysisRuleAggregationProperty analysisRuleAggregationProperty = AnalysisRuleAggregationProperty.builder()
        .aggregateColumns(List.of(AggregateColumnProperty.builder()
                .columnNames(List.of("columnNames"))
                .function("function")
                .build()))
        .dimensionColumns(List.of("dimensionColumns"))
        .joinColumns(List.of("joinColumns"))
        .outputConstraints(List.of(AggregationConstraintProperty.builder()
                .columnName("columnName")
                .minimum(123)
                .type("type")
                .build()))
        .scalarFunctions(List.of("scalarFunctions"))

        // the properties below are optional
        .additionalAnalyses("additionalAnalyses")
        .allowedJoinOperators(List.of("allowedJoinOperators"))
        .joinRequired("joinRequired")
        .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.CleanRooms;

var analysisRuleAggregationProperty = new AnalysisRuleAggregationProperty {
    AggregateColumns = new [] { new AggregateColumnProperty {
        ColumnNames = new [] { "columnNames" },
        Function = "function"
    } },
    DimensionColumns = new [] { "dimensionColumns" },
    JoinColumns = new [] { "joinColumns" },
    OutputConstraints = new [] { new AggregationConstraintProperty {
        ColumnName = "columnName",
        Minimum = 123,
        Type = "type"
    } },
    ScalarFunctions = new [] { "scalarFunctions" },

    // the properties below are optional
    AdditionalAnalyses = "additionalAnalyses",
    AllowedJoinOperators = new [] { "allowedJoinOperators" },
    JoinRequired = "joinRequired"
};
```

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"

analysisRuleAggregationProperty := &AnalysisRuleAggregationProperty{
	AggregateColumns: []interface{}{
		&AggregateColumnProperty{
			ColumnNames: []*string{
				jsii.String("columnNames"),
			},
			Function: jsii.String("function"),
		},
	},
	DimensionColumns: []*string{
		jsii.String("dimensionColumns"),
	},
	JoinColumns: []*string{
		jsii.String("joinColumns"),
	},
	OutputConstraints: []interface{}{
		&AggregationConstraintProperty{
			ColumnName: jsii.String("columnName"),
			Minimum: jsii.Number(123),
			Type: jsii.String("type"),
		},
	},
	ScalarFunctions: []*string{
		jsii.String("scalarFunctions"),
	},

	// the properties below are optional
	AdditionalAnalyses: jsii.String("additionalAnalyses"),
	AllowedJoinOperators: []*string{
		jsii.String("allowedJoinOperators"),
	},
	JoinRequired: jsii.String("joinRequired"),
}
```

## Properties

- `additionalAnalyses`: string — An indicator as to whether additional analyses (such as AWS Clean Rooms ML) can be applied to the output of the direct query.

  The `additionalAnalyses` parameter is currently supported for the list analysis rule ( `AnalysisRuleList` ) and the custom analysis rule ( `AnalysisRuleCustom` ).

- `aggregateColumns`: [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) | [CfnConfiguredTable.AggregateColumnProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cleanrooms.CfnConfiguredTable.AggregateColumnProperty.html)[] (required) — The columns that query runners are allowed to use in aggregation queries.

- `allowedJoinOperators`: string[] — Which logical operators (if any) are to be used in an INNER JOIN match condition.

  Default is `AND` .

- `dimensionColumns`: string[] (required) — The columns that query runners are allowed to select, group by, or filter by.

- `joinColumns`: string[] (required) — Columns in configured table that can be used in join statements and/or as aggregate columns.

  They can never be outputted directly.

- `joinRequired`: string — Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

- `outputConstraints`: [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) | [CfnConfiguredTable.AggregationConstraintProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cleanrooms.CfnConfiguredTable.AggregationConstraintProperty.html)[] (required) — Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

- `scalarFunctions`: string[] (required) — Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.
