Amazon S3 Tables¶
Create a Table Bucket¶
To create an Amazon S3 Tables table bucket, use
S3TablesCreateTableBucketOperator.
create_table_bucket = S3TablesCreateTableBucketOperator(
task_id="create_table_bucket",
table_bucket_name=bucket_name,
)
Create a Namespace¶
To create a namespace in an Amazon S3 Tables table bucket, use
S3TablesCreateNamespaceOperator.
setup_namespace = S3TablesCreateNamespaceOperator(
task_id="create_namespace",
table_bucket_arn=create_table_bucket.output,
namespace=namespace,
)
Create a Table¶
To create a new Iceberg table in an Amazon S3 Tables namespace you can use
S3TablesCreateTableOperator.
create_table = S3TablesCreateTableOperator(
task_id="create_table",
table_bucket_arn=create_table_bucket.output,
namespace=namespace,
table_name=table_name,
metadata=SCHEMA,
)
Delete a Namespace¶
To delete a namespace from an Amazon S3 Tables table bucket, use
S3TablesDeleteNamespaceOperator.
delete_namespace = S3TablesDeleteNamespaceOperator(
task_id="delete_namespace",
table_bucket_arn=create_table_bucket.output,
namespace=namespace,
trigger_rule=TriggerRule.ALL_DONE,
)
Delete a Table¶
To delete a table from an Amazon S3 Tables namespace, use
S3TablesDeleteTableOperator.
delete_table = S3TablesDeleteTableOperator(
task_id="delete_table",
table_bucket_arn=create_table_bucket.output,
namespace=namespace,
table_name=table_name,
trigger_rule=TriggerRule.ALL_DONE,
)
Delete a Table Bucket¶
To delete an Amazon S3 Tables table bucket, use
S3TablesDeleteTableBucketOperator.
delete_table_bucket = S3TablesDeleteTableBucketOperator(
task_id="delete_table_bucket",
table_bucket_arn=create_table_bucket.output,
trigger_rule=TriggerRule.ALL_DONE,
)