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

Settings governing the Compaction maintenance action.

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

## 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

- `status`: [Status](/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.Status.html) (required) — Status of the compaction maintenance action.

- `targetFileSizeMb`: number (required) — Target file size in megabytes for compaction.
