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

Properties for creating a new S3 Table.

Used as props by: [Table](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.Table.html)

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

## Example

TypeScript:

```ts
// Build a table with partition spec (minimal configuration)
const partitionedTable = new Table(scope, 'PartitionedTable', {
    tableName: 'partitioned_table',
    namespace: namespace,
    openTableFormat: OpenTableFormat.ICEBERG,
    icebergMetadata: {
        icebergSchema: {
            schemaFieldList: [
                { name: 'event_date', type: 'date', required: true },
                { name: 'event_name', type: 'string' },
            ],
        },
        icebergPartitionSpec: {
            fields: [
                {
                    sourceId: 1,
                    transform: IcebergTransform.IDENTITY,
                    name: 'date_partition',
                },
            ],
        },
    },
});
```

Python:

```python
from aws_cdk.aws_s3tables_alpha import IcebergMetadataProperty, IcebergSchemaProperty, SchemaFieldProperty, SchemaFieldProperty, IcebergPartitionSpec, IcebergPartitionField
# Build a table with partition spec (minimal configuration)
partitioned_table = Table(scope, "PartitionedTable",
    table_name="partitioned_table",
    namespace=namespace,
    open_table_format=OpenTableFormat.ICEBERG,
    iceberg_metadata=IcebergMetadataProperty(
        iceberg_schema=IcebergSchemaProperty(
            schema_field_list=[SchemaFieldProperty(name="event_date", type="date", required=True), SchemaFieldProperty(name="event_name", type="string")
            ]
        ),
        iceberg_partition_spec=IcebergPartitionSpec(
            fields=[IcebergPartitionField(
                source_id=1,
                transform=IcebergTransform.IDENTITY,
                name="date_partition"
            )
            ]
        )
    )
)
```

Java:

```java
// Build a table with partition spec (minimal configuration)
Table partitionedTable = Table.Builder.create(scope, "PartitionedTable")
        .tableName("partitioned_table")
        .namespace(namespace)
        .openTableFormat(OpenTableFormat.ICEBERG)
        .icebergMetadata(IcebergMetadataProperty.builder()
                .icebergSchema(IcebergSchemaProperty.builder()
                        .schemaFieldList(List.of(SchemaFieldProperty.builder().name("event_date").type("date").required(true).build(), SchemaFieldProperty.builder().name("event_name").type("string").build()))
                        .build())
                .icebergPartitionSpec(IcebergPartitionSpec.builder()
                        .fields(List.of(IcebergPartitionField.builder()
                                .sourceId(1)
                                .transform(IcebergTransform.IDENTITY)
                                .name("date_partition")
                                .build()))
                        .build())
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.S3Tables.Alpha
// Build a table with partition spec (minimal configuration)
var partitionedTable = new Table(scope, "PartitionedTable", new TableProps {
    TableName = "partitioned_table",
    Namespace = namespace,
    OpenTableFormat = OpenTableFormat.ICEBERG,
    IcebergMetadata = new IcebergMetadataProperty {
        IcebergSchema = new IcebergSchemaProperty {
            SchemaFieldList = new [] { new SchemaFieldProperty { Name = "event_date", Type = "date", Required = true }, new SchemaFieldProperty { Name = "event_name", Type = "string" } }
        },
        IcebergPartitionSpec = new IcebergPartitionSpec {
            Fields = new [] { new IcebergPartitionField {
                SourceId = 1,
                Transform = IcebergTransform.IDENTITY,
                Name = "date_partition"
            } }
        }
    }
});
```

Golang:

```go
// Build a table with partition spec (minimal configuration)
partitionedTable := awscdkawss3tablesalpha.NewTable(*scope, jsii.String("PartitionedTable"), &TableProps{
	TableName: jsii.String("partitioned_table"),
	Namespace: namespace,
	OpenTableFormat: *awscdkawss3tablesalpha.OpenTableFormat_ICEBERG,
	IcebergMetadata: &IcebergMetadataProperty{
		IcebergSchema: &IcebergSchemaProperty{
			SchemaFieldList: []SchemaFieldProperty{
				&SchemaFieldProperty{
					Name: jsii.String("event_date"),
					Type: jsii.String("date"),
					Required: jsii.Boolean(true),
				},
				&SchemaFieldProperty{
					Name: jsii.String("event_name"),
					Type: jsii.String("string"),
				},
			},
		},
		IcebergPartitionSpec: &IcebergPartitionSpec{
			Fields: []IcebergPartitionField{
				&IcebergPartitionField{
					SourceId: jsii.Number(1),
					Transform: *awscdkawss3tablesalpha.IcebergTransform_IDENTITY(),
					Name: jsii.String("date_partition"),
				},
			},
		},
	},
})
```

## Properties

- `compaction`: [CompactionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.CompactionProperty.html) — Settings governing the Compaction maintenance action.

  **Default:** Amazon S3 selects the best compaction strategy based on your table sort order.

- `icebergMetadata`: [IcebergMetadataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.IcebergMetadataProperty.html) — Contains details about the metadata for an Iceberg table.

  **Default:** table is created without any metadata

- `namespace`: [INamespace](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.INamespace.html) (required) — The namespace under which this table is created.

- `openTableFormat`: [OpenTableFormat](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.OpenTableFormat.html) (required) — Format of this table.

  Currently, the only supported value is OpenTableFormat.ICEBERG.

- `removalPolicy`: [RemovalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RETAIN — Controls what happens to this table it it stoped being managed by cloudformation.

- `snapshotManagement`: [SnapshotManagementProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.SnapshotManagementProperty.html) — Contains details about the snapshot management settings for an Iceberg table.

  **Default:** enabled: MinimumSnapshots is 1 by default and MaximumSnapshotAge is 120 hours by default.

- `storageClass`: [StorageClass](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.StorageClass.html) — The storage class for the table.

  **Default:** Inherits from the table bucket's storage class configuration

  Determines the storage tier used for table data, allowing optimization
  for different access patterns and cost profiles.

  Note: This is a create-only property and cannot be changed after the table is created.

- `tableName`: string (required) — Name of this table, unique within the namespace.

- `withoutMetadata`: boolean = false — If true, indicates that you don't want to specify a schema for the table.

  This property is mutually exclusive to 'IcebergMetadata'.
