Skip to content
v2.277.0

Experimental

@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ColumnEncoding Enum ​

The compression encoding of a column.

Example ​

ts
import { ColumnEncoding } from '@aws-cdk/aws-redshift-alpha';

new Table(this, 'Table', {
  tableColumns: [
    { name: 'col1', dataType: 'varchar(4)', encoding: ColumnEncoding.TEXT32K },
    { name: 'col2', dataType: 'float', encoding: ColumnEncoding.DELTA32K },
  ],
  cluster: cluster,
  databaseName: 'databaseName',
});
python
from aws_cdk.aws_redshift_alpha import Column, Column
from aws_cdk.aws_redshift_alpha import ColumnEncoding


Table(self, "Table",
    table_columns=[Column(name="col1", data_type="varchar(4)", encoding=ColumnEncoding.TEXT32K), Column(name="col2", data_type="float", encoding=ColumnEncoding.DELTA32K)
    ],
    cluster=cluster,
    database_name="databaseName"
)
java
import software.amazon.awscdk.services.redshift.alpha.ColumnEncoding;


Table.Builder.create(this, "Table")
        .tableColumns(List.of(Column.builder().name("col1").dataType("varchar(4)").encoding(ColumnEncoding.TEXT32K).build(), Column.builder().name("col2").dataType("float").encoding(ColumnEncoding.DELTA32K).build()))
        .cluster(cluster)
        .databaseName("databaseName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Redshift.Alpha
using Amazon.CDK.AWS.Redshift.Alpha;


new Table(this, "Table", new TableProps {
    TableColumns = new [] { new Column { Name = "col1", DataType = "varchar(4)", Encoding = ColumnEncoding.TEXT32K }, new Column { Name = "col2", DataType = "float", Encoding = ColumnEncoding.DELTA32K } },
    Cluster = cluster,
    DatabaseName = "databaseName"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2
import "github.com/aws/aws-cdk-go/awscdkredshiftalpha"


awscdkredshiftalpha.NewTable(this, jsii.String("Table"), &TableProps{
	TableColumns: []Column{
		&Column{
			Name: jsii.String("col1"),
			DataType: jsii.String("varchar(4)"),
			Encoding: awscdkredshiftalpha.ColumnEncoding_TEXT32K,
		},
		&Column{
			Name: jsii.String("col2"),
			DataType: jsii.String("float"),
			Encoding: awscdkredshiftalpha.ColumnEncoding_DELTA32K,
		},
	},
	Cluster: cluster,
	DatabaseName: jsii.String("databaseName"),
})

Members ​

MemberDescription
AUTOAmazon Redshift assigns an optimal encoding based on the column data.
RAWThe column is not compressed.
AZ64The column is compressed using the AZ64 algorithm.
BYTEDICTThe column is compressed using a separate dictionary for each block column value on disk.
DELTAThe column is compressed based on the difference between values in the column.
DELTA32KThe column is compressed based on the difference between values in the column.
LZOThe column is compressed using the LZO algorithm.
MOSTLY8The column is compressed to a smaller storage size than the original data type.
MOSTLY16The column is compressed to a smaller storage size than the original data type.
MOSTLY32The column is compressed to a smaller storage size than the original data type.
RUNLENGTHThe column is compressed by recording the number of occurrences of each value in the column.
TEXT255The column is compressed by recording the first 245 unique words and then using a 1-byte index to represent each word.
TEXT32KThe column is compressed by recording the first 32K unique words and then using a 2-byte index to represent each word.
ZSTDThe column is compressed using the ZSTD algorithm.

Referenced by ​

  • Column.encodingencodingencodingEncodingEncoding