TableProps

class aws_cdk.aws_s3tables_alpha.TableProps(*, namespace, open_table_format, table_name, compaction=None, iceberg_metadata=None, removal_policy=None, snapshot_management=None, without_metadata=None)

Bases: object

(experimental) Properties for creating a new S3 Table.

Parameters:
  • namespace (INamespace) – (experimental) The namespace under which this table is created.

  • open_table_format (OpenTableFormat) – (experimental) Format of this table. Currently, the only supported value is OpenTableFormat.ICEBERG.

  • table_name (str) – (experimental) Name of this table, unique within the namespace.

  • compaction (Union[CompactionProperty, Dict[str, Any], None]) – (experimental) Settings governing the Compaction maintenance action. Default: Amazon S3 selects the best compaction strategy based on your table sort order.

  • iceberg_metadata (Union[IcebergMetadataProperty, Dict[str, Any], None]) – (experimental) Contains details about the metadata for an Iceberg table. Default: table is created without any metadata

  • removal_policy (Optional[RemovalPolicy]) – (experimental) Controls what happens to this table it it stoped being managed by cloudformation. Default: RETAIN

  • snapshot_management (Union[SnapshotManagementProperty, Dict[str, Any], None]) – (experimental) 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.

  • without_metadata (Optional[bool]) – (experimental) If true, indicates that you don’t want to specify a schema for the table. This property is mutually exclusive to ‘IcebergMetadata’. Default: false

Stability:

experimental

ExampleMetadata:

infused

Example:

# Build a table
sample_table = Table(scope, "ExampleTable",
    table_name="example_table",
    namespace=namespace,
    open_table_format=OpenTableFormat.ICEBERG,
    without_metadata=True
)

# Build a table with an Iceberg Schema
sample_table_with_schema = Table(scope, "ExampleSchemaTable",
    table_name="example_table_with_schema",
    namespace=namespace,
    open_table_format=OpenTableFormat.ICEBERG,
    iceberg_metadata=IcebergMetadataProperty(
        iceberg_schema=IcebergSchemaProperty(
            schema_field_list=[SchemaFieldProperty(
                name="id",
                type="int",
                required=True
            ), SchemaFieldProperty(
                name="name",
                type="string"
            )
            ]
        )
    ),
    compaction=CompactionProperty(
        status=Status.ENABLED,
        target_file_size_mb=128
    ),
    snapshot_management=SnapshotManagementProperty(
        status=Status.ENABLED,
        max_snapshot_age_hours=48,
        min_snapshots_to_keep=5
    )
)

Attributes

compaction

(experimental) Settings governing the Compaction maintenance action.

Default:

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

See:

https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-maintenance.html

Stability:

experimental

iceberg_metadata

(experimental) Contains details about the metadata for an Iceberg table.

Default:

table is created without any metadata

Stability:

experimental

namespace

(experimental) The namespace under which this table is created.

Stability:

experimental

open_table_format

(experimental) Format of this table.

Currently, the only supported value is OpenTableFormat.ICEBERG.

Stability:

experimental

removal_policy

(experimental) Controls what happens to this table it it stoped being managed by cloudformation.

Default:

RETAIN

Stability:

experimental

snapshot_management

(experimental) 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.

Stability:

experimental

table_name

(experimental) Name of this table, unique within the namespace.

Stability:

experimental

without_metadata

(experimental) If true, indicates that you don’t want to specify a schema for the table.

This property is mutually exclusive to ‘IcebergMetadata’.

Default:

false

Stability:

experimental