Experimental
@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
TableSortStyle Enum
The sort style of a table.
| Stability | Experimental |
|---|---|
| Source | lib/table.ts |
Example
ts
new Table(this, 'Table', {
tableColumns: [
{ name: 'col1', dataType: 'varchar(4)', sortKey: true },
{ name: 'col2', dataType: 'float', sortKey: true },
],
cluster: cluster,
databaseName: 'databaseName',
sortStyle: TableSortStyle.COMPOUND,
});
java
Table.Builder.create(this, "Table")
.tableColumns(List.of(Column.builder().name("col1").dataType("varchar(4)").sortKey(true).build(), Column.builder().name("col2").dataType("float").sortKey(true).build()))
.cluster(cluster)
.databaseName("databaseName")
.sortStyle(TableSortStyle.COMPOUND)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Redshift.Alpha
new Table(this, "Table", new TableProps {
TableColumns = new [] { new Column { Name = "col1", DataType = "varchar(4)", SortKey = true }, new Column { Name = "col2", DataType = "float", SortKey = true } },
Cluster = cluster,
DatabaseName = "databaseName",
SortStyle = TableSortStyle.COMPOUND
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2
awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &TableProps{
TableColumns: []Column{
&Column{
Name: jsii.String("col1"),
DataType: jsii.String("varchar(4)"),
SortKey: jsii.Boolean(true),
},
&Column{
Name: jsii.String("col2"),
DataType: jsii.String("float"),
SortKey: jsii.Boolean(true),
},
},
Cluster: cluster,
DatabaseName: jsii.String("databaseName"),
SortStyle: awscdkredshiftalpha.TableSortStyle_COMPOUND,
})
Members
| Member | Description |
|---|---|
AUTO | Amazon Redshift assigns an optimal sort key based on the table data. |
COMPOUND | Specifies that the data is sorted using a compound key made up of all of the listed columns, in the order they are listed. |
INTERLEAVED | Specifies that the data is sorted using an interleaved sort key. |
Referenced by
TableProps.sortStylesort_stylesortStyleSortStyleSortStyle