IcebergPartitionSpec

class aws_cdk.aws_s3tables_alpha.IcebergPartitionSpec(*, fields, spec_id=None)

Bases: object

(experimental) Partition specification for Iceberg table.

Contains the complete partitioning configuration for a table, including all partition fields. Use this to define multi-level partitioning (e.g., partition by date, then by region).

Parameters:
  • fields (Sequence[Union[IcebergPartitionField, Dict[str, Any]]]) – (experimental) The list of partition fields.

  • spec_id (Union[int, float, None]) – (experimental) The unique identifier for the partition specification. Default: 0

Stability:

experimental

ExampleMetadata:

infused

Example:

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"
            )
            ]
        )
    )
)

Attributes

fields

(experimental) The list of partition fields.

Stability:

experimental

spec_id

(experimental) The unique identifier for the partition specification.

Default:

0

Stability:

experimental