IcebergSortOrder
- class aws_cdk.aws_s3tables_alpha.IcebergSortOrder(*, fields, order_id=None)
Bases:
object(experimental) Sort order specification for Iceberg table.
- Parameters:
fields (
Sequence[Union[IcebergSortField,Dict[str,Any]]]) – (experimental) The list of sort fields.order_id (
Union[int,float,None]) – (experimental) The unique identifier for the sort order. Default: 1
- Stability:
experimental
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_s3tables_alpha import IcebergMetadataProperty, IcebergSchemaProperty, SchemaFieldProperty, SchemaFieldProperty, IcebergPartitionSpec, IcebergPartitionField, IcebergSortOrder, IcebergSortField, TablePropertyEntry # Build a table with partition spec, sort order, and table properties advanced_table = Table(scope, "AdvancedTable", table_name="advanced_table", namespace=namespace, open_table_format=OpenTableFormat.ICEBERG, iceberg_metadata=IcebergMetadataProperty( iceberg_schema=IcebergSchemaProperty( schema_field_list=[SchemaFieldProperty(id=1, name="event_date", type="date", required=True), SchemaFieldProperty(id=2, name="user_id", type="string", required=True) ] ), iceberg_partition_spec=IcebergPartitionSpec( spec_id=0, fields=[IcebergPartitionField( source_id=1, transform=IcebergTransform.IDENTITY, name="date_partition", field_id=1000 ) ] ), iceberg_sort_order=IcebergSortOrder( order_id=1, fields=[IcebergSortField( source_id=1, transform=IcebergTransform.IDENTITY, direction=SortDirection.ASC, null_order=NullOrder.NULLS_LAST ) ] ), table_properties=[TablePropertyEntry(key="write.format.default", value="parquet") ] ) )
Attributes
- fields
(experimental) The list of sort fields.
- Stability:
experimental
- order_id
(experimental) The unique identifier for the sort order.
- Default:
1
- Stability:
experimental