Schema
- class aws_cdk.aws_glue_alpha.Schema
Bases:
object- See:
https://docs.aws.amazon.com/athena/latest/ug/data-types.html
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# my_database: glue.Database glue.S3Table(self, "MyTable", database=my_database, columns=[glue.Column( name="data", type=glue.Schema.STRING )], partition_keys=[glue.Column( name="date", type=glue.Schema.STRING )], data_format=glue.DataFormat.JSON, partition_projection={ "date": glue.PartitionProjectionConfiguration.date( min="NOW-3YEARS", max="NOW", format="yyyy-MM-dd" ) } )
- Stability:
experimental
Attributes
- BIG_INT = <aws_cdk.aws_glue_alpha.Type object>
- BINARY = <aws_cdk.aws_glue_alpha.Type object>
- BOOLEAN = <aws_cdk.aws_glue_alpha.Type object>
- DATE = <aws_cdk.aws_glue_alpha.Type object>
- DOUBLE = <aws_cdk.aws_glue_alpha.Type object>
- FLOAT = <aws_cdk.aws_glue_alpha.Type object>
- INTEGER = <aws_cdk.aws_glue_alpha.Type object>
- SMALL_INT = <aws_cdk.aws_glue_alpha.Type object>
- STRING = <aws_cdk.aws_glue_alpha.Type object>
- TIMESTAMP = <aws_cdk.aws_glue_alpha.Type object>
- TINY_INT = <aws_cdk.aws_glue_alpha.Type object>
Static Methods
- classmethod array(item_type)
(experimental) Creates an array of some other type.
- classmethod char(length)
(experimental) Fixed length character data, with a specified length between 1 and 255.
- Parameters:
length (
Union[int,float]) – length between 1 and 255.- Stability:
experimental
- Return type:
- classmethod custom(input_string, is_primitive=None)
(experimental) Creates a custom type from a raw Glue input string.
Escape hatch for column types the other
Schemafactories don’t model. TheinputStringis emitted verbatim and is not validated.- Parameters:
input_string (
str) – the Glue input string for the type (for exampleinterval_day_to_second).is_primitive (
Optional[bool]) – whether the type is a primitive (non-nested) data type. Defaults to true.
- Stability:
experimental
- Return type:
- classmethod decimal(precision, scale=None)
(experimental) Creates a decimal type.
- Parameters:
precision (
Union[int,float]) – the total number of digits, between 1 and 38.scale (
Union[int,float,None]) – the number of digits in the fractional part, between 0 and 38; the default is 0
- See:
https://docs.aws.amazon.com/athena/latest/ug/data-types.html
- Stability:
experimental
- Return type:
- classmethod map(key_type, value_type)
(experimental) Creates a map of some primitive key type to some value type.
- classmethod struct(columns)
(experimental) Creates a nested structure containing individually named and typed columns.