> **Experimental**
>
> `@aws-cdk/aws-redshift-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# Column

A column in a Redshift table.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/table.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-redshift-alpha/lib/table.ts#L61)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as redshift_alpha from '@aws-cdk/aws-redshift-alpha';
const column: redshift_alpha.Column = {
  dataType: 'dataType',
  name: 'name',

  // the properties below are optional
  comment: 'comment',
  distKey: false,
  encoding: redshift_alpha.ColumnEncoding.AUTO,
  id: 'id',
  sortKey: false,
};
```

Python:

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

column = redshift_alpha.Column(
    data_type="dataType",
    name="name",

    # the properties below are optional
    comment="comment",
    dist_key=False,
    encoding=redshift_alpha.ColumnEncoding.AUTO,
    id="id",
    sort_key=False
)
```

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.redshift.alpha.*;

Column column = Column.builder()
        .dataType("dataType")
        .name("name")

        // the properties below are optional
        .comment("comment")
        .distKey(false)
        .encoding(ColumnEncoding.AUTO)
        .id("id")
        .sortKey(false)
        .build();
```

C# / .NET:

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

var column = new Column {
    DataType = "dataType",
    Name = "name",

    // the properties below are optional
    Comment = "comment",
    DistKey = false,
    Encoding = ColumnEncoding.AUTO,
    Id = "id",
    SortKey = false
};
```

Golang:

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

column := &Column{
	DataType: jsii.String("dataType"),
	Name: jsii.String("name"),

	// the properties below are optional
	Comment: jsii.String("comment"),
	DistKey: jsii.Boolean(false),
	Encoding: redshift_alpha.ColumnEncoding_AUTO,
	Id: jsii.String("id"),
	SortKey: jsii.Boolean(false),
}
```

## Properties

- `comment`: string — A comment to attach to the column.

  **Default:** no comment

- `dataType`: string (required) — The data type of the column.

- `distKey`: boolean — Boolean value that indicates whether the column is to be configured as DISTKEY.

  **Default:** column is not DISTKEY

- `encoding`: [ColumnEncoding](/cdk/api/v2/docs/@aws-cdk_aws-redshift-alpha.ColumnEncoding.html) — The encoding to use for the column.

  **Default:** Amazon Redshift determines the encoding based on the data type.

- `id`: string — The unique identifier of the column.

  **Default:** the column name is used as the identifier

  This is not the name of the column, and renaming this identifier will cause a new column to be created and the old column to be dropped.

  **NOTE** - This field will be set, however, only by setting the `@aws-cdk/aws-redshift:columnId` feature flag will this field be used.

- `name`: string (required) — The name of the column.

  This will appear on Amazon Redshift.

- `sortKey`: boolean — Boolean value that indicates whether the column is to be configured as SORTKEY.

  **Default:** column is not a SORTKEY
