Skip to content
v2.277.0

CompressionType Enum ​

The compression type.

Example ​

ts
declare const myDatabase: glue.Database;
new glue.S3Table(this, 'MyTable', {
  storageParameters: [
    glue.StorageParameter.skipHeaderLineCount(1),
    glue.StorageParameter.compressionType(glue.CompressionType.GZIP),
    glue.StorageParameter.custom('separatorChar', ',')
  ],
  // ...
  database: myDatabase,
  columns: [{
    name: 'col1',
    type: glue.Schema.STRING,
  }],
  dataFormat: glue.DataFormat.JSON,
});
python
# my_database: glue.Database

glue.S3Table(self, "MyTable",
    storage_parameters=[
        glue.StorageParameter.skip_header_line_count(1),
        glue.StorageParameter.compression_type(glue.CompressionType.GZIP),
        glue.StorageParameter.custom("separatorChar", ",")
    ],
    # ...
    database=my_database,
    columns=[glue.Column(
        name="col1",
        type=glue.Schema.STRING
    )],
    data_format=glue.DataFormat.JSON
)
java
Database myDatabase;

S3Table.Builder.create(this, "MyTable")
        .storageParameters(List.of(StorageParameter.skipHeaderLineCount(1), StorageParameter.compressionType(CompressionType.GZIP), StorageParameter.custom("separatorChar", ",")))
        // ...
        .database(myDatabase)
        .columns(List.of(Column.builder()
                .name("col1")
                .type(Schema.STRING)
                .build()))
        .dataFormat(DataFormat.JSON)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Database myDatabase;

new S3Table(this, "MyTable", new S3TableProps {
    StorageParameters = new [] { StorageParameter.SkipHeaderLineCount(1), StorageParameter.CompressionType(CompressionType.GZIP), StorageParameter.Custom("separatorChar", ",") },
    // ...
    Database = myDatabase,
    Columns = new [] { new Column {
        Name = "col1",
        Type = Schema.STRING
    } },
    DataFormat = DataFormat.JSON
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var myDatabase Database

glue.NewS3Table(this, jsii.String("MyTable"), &S3TableProps{
	StorageParameters: []StorageParameter{
		glue.StorageParameter_SkipHeaderLineCount(jsii.Number(1)),
		glue.StorageParameter_CompressionType(glue.CompressionType_GZIP),
		glue.StorageParameter_Custom(jsii.String("separatorChar"), jsii.String(",")),
	},
	// ...
	Database: myDatabase,
	Columns: []Column{
		&Column{
			Name: jsii.String("col1"),
			Type: glue.Schema_STRING(),
		},
	},
	DataFormat: glue.DataFormat_JSON(),
})

Members ​

MemberDescription
NONENo compression.
BZIP2Burrows-Wheeler compression.
GZIPDeflate compression.
SNAPPYCompression algorithm focused on high compression and decompression speeds, rather than the maximum possible compression.