Schema
- class aws_cdk.aws_glue.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.Table(self, "MyTable", database=my_database, table_name="my_table", columns=[glue.Column( name="col1", type=glue.Schema.STRING )], partition_keys=[glue.Column( name="year", type=glue.Schema.SMALL_INT ), glue.Column( name="month", type=glue.Schema.SMALL_INT )], data_format=glue.DataFormat.JSON )
- Stability:
experimental
Attributes
- BIG_INT = Type(input_string='bigint', is_primitive=True)
- BINARY = Type(input_string='binary', is_primitive=True)
- BOOLEAN = Type(input_string='boolean', is_primitive=True)
- DATE = Type(input_string='date', is_primitive=True)
- DOUBLE = Type(input_string='double', is_primitive=True)
- FLOAT = Type(input_string='float', is_primitive=True)
- INTEGER = Type(input_string='int', is_primitive=True)
- SMALL_INT = Type(input_string='smallint', is_primitive=True)
- STRING = Type(input_string='string', is_primitive=True)
- TIMESTAMP = Type(input_string='timestamp', is_primitive=True)
- TINY_INT = Type(input_string='tinyint', is_primitive=True)
Static Methods
- classmethod array(*, input_string, is_primitive)
(experimental) Creates an array of some other type.
- Parameters:
input_string (
str
) – (experimental) Glue InputString for this type.is_primitive (
bool
) – (experimental) Indicates whether this type is a primitive data type.
- Stability:
experimental
- Return 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 decimal(precision, scale=None)
(experimental) Creates a decimal type.
TODO: Bounds
- Parameters:
precision (
Union
[int
,float
]) – the total number of digits.scale (
Union
[int
,float
,None
]) – the number of digits in fractional part, the default is 0.
- Stability:
experimental
- Return type:
- classmethod map(key_type, *, input_string, is_primitive)
(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.