IcebergTransform

class aws_cdk.aws_s3tables_alpha.IcebergTransform(*args: Any, **kwargs)

Bases: object

(experimental) Iceberg transform values for partition and sort fields.

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

Methods

to_string()

(experimental) Returns the string representation of the transform.

Stability:

experimental

Return type:

str

Attributes

DAY = <aws_cdk.aws_s3tables_alpha.IcebergTransform object>
HOUR = <aws_cdk.aws_s3tables_alpha.IcebergTransform object>
IDENTITY = <aws_cdk.aws_s3tables_alpha.IcebergTransform object>
MONTH = <aws_cdk.aws_s3tables_alpha.IcebergTransform object>
YEAR = <aws_cdk.aws_s3tables_alpha.IcebergTransform object>
value

(experimental) The string value of the transform.

Stability:

experimental

Static Methods

classmethod bucket(n)

(experimental) Transform values into a fixed number of buckets.

Parameters:

n (Union[int, float]) – The number of buckets (must be a positive integer).

Stability:

experimental

Return type:

IcebergTransform

classmethod of(value)

(experimental) Create a custom transform from a string value.

Parameters:

value (str) – The transform string value.

Stability:

experimental

Return type:

IcebergTransform

classmethod truncate(width)

(experimental) Truncate values to a fixed width.

Parameters:

width (Union[int, float]) – The truncation width (must be a positive integer).

Stability:

experimental

Return type:

IcebergTransform