# QueryActionProperty

An "SqlQueryDatasetAction" object that uses an SQL query to automatically create data set contents.

- 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_iotanalytics as iotanalytics } from 'aws-cdk-lib';
const queryActionProperty: iotanalytics.CfnDataset.QueryActionProperty = {
  sqlQuery: 'sqlQuery',

  // the properties below are optional
  filters: [{
    deltaTime: {
      offsetSeconds: 123,
      timeExpression: 'timeExpression',
    },
  }],
};
```

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_iotanalytics as iotanalytics

query_action_property = iotanalytics.CfnDataset.QueryActionProperty(
    sql_query="sqlQuery",

    # the properties below are optional
    filters=[iotanalytics.CfnDataset.FilterProperty(
        delta_time=iotanalytics.CfnDataset.DeltaTimeProperty(
            offset_seconds=123,
            time_expression="timeExpression"
        )
    )]
)
```

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

QueryActionProperty queryActionProperty = QueryActionProperty.builder()
        .sqlQuery("sqlQuery")

        // the properties below are optional
        .filters(List.of(FilterProperty.builder()
                .deltaTime(DeltaTimeProperty.builder()
                        .offsetSeconds(123)
                        .timeExpression("timeExpression")
                        .build())
                .build()))
        .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.IoTAnalytics;

var queryActionProperty = new QueryActionProperty {
    SqlQuery = "sqlQuery",

    // the properties below are optional
    Filters = new [] { new FilterProperty {
        DeltaTime = new DeltaTimeProperty {
            OffsetSeconds = 123,
            TimeExpression = "timeExpression"
        }
    } }
};
```

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"

queryActionProperty := &QueryActionProperty{
	SqlQuery: jsii.String("sqlQuery"),

	// the properties below are optional
	Filters: []interface{}{
		&FilterProperty{
			DeltaTime: &DeltaTimeProperty{
				OffsetSeconds: jsii.Number(123),
				TimeExpression: jsii.String("timeExpression"),
			},
		},
	},
}
```

## Properties

- `filters`: [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) | [CfnDataset.FilterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDataset.FilterProperty.html)[] — Pre-filters applied to message data.

- `sqlQuery`: string (required) — An "SqlQueryDatasetAction" object that uses an SQL query to automatically create data set contents.
