AthenaCTASSettings

class awswrangler.typing.AthenaCTASSettings

Bases: TypedDict

Typed dictionary defining the settings for using CTAS (Create Table As Statement).

Attributes

database

The name of the alternative database where the CTAS temporary table is stored.

temp_table_name

The name of the temporary table and also the directory name on S3 where the CTAS result is stored.

bucketing_info

Tuple consisting of the column names used for bucketing as the first element and the number of buckets as the second element.

compression

Write compression for the temporary table where the CTAS result is stored.

Attributes Documentation

database: NotRequired[str]

The name of the alternative database where the CTAS temporary table is stored. If None, the default database is used.

temp_table_name: NotRequired[str]

The name of the temporary table and also the directory name on S3 where the CTAS result is stored. If None, it will use the follow random pattern: f”temp_table_{uuid.uuid4().hex()}”. On S3 this directory will be under under the pattern: f”{s3_output}/{ctas_temp_table_name}/”.

bucketing_info: NotRequired[Tuple[List[str], int]]

Tuple consisting of the column names used for bucketing as the first element and the number of buckets as the second element. Only str, int and bool are supported as column data types for bucketing.

compression: NotRequired[str]

Write compression for the temporary table where the CTAS result is stored. Corresponds to the write_compression parameters for CREATE TABLE AS statement in Athena.