Skip to content
v2.274.0

Experimental

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

CompactionProperty Struct ​

Settings governing the Compaction maintenance action.

Example ​

ts
// Build a table
const sampleTable = new Table(scope, 'ExampleTable', {
    tableName: 'example_table',
    namespace: namespace,
    openTableFormat: OpenTableFormat.ICEBERG,
    withoutMetadata: true,
});

// Build a table with an Iceberg Schema
const sampleTableWithSchema = new Table(scope, 'ExampleSchemaTable', {
    tableName: 'example_table_with_schema',
    namespace: namespace,
    openTableFormat: OpenTableFormat.ICEBERG,
    icebergMetadata: {
        icebergSchema: {
            schemaFieldList: [
            {
                name: 'id',
                type: 'int',
                required: true,
            },
            {
                name: 'name',
                type: 'string',
            },
            ],
        },
    },
    compaction: {
        status: Status.ENABLED,
        targetFileSizeMb: 128,
    },
    snapshotManagement: {
        status: Status.ENABLED,
        maxSnapshotAgeHours: 48,
        minSnapshotsToKeep: 5,
    },
});

Properties ​

statusStatusstatusStatusstatusStatusStatusStatusStatusStatusrequired#
Status of the compaction maintenance action.
targetFileSizeMbnumbertarget_file_size_mbint | floattargetFileSizeMbNumberTargetFileSizeMbdoubleTargetFileSizeMb*float64required#
Target file size in megabytes for compaction.