Schema

class aws_cdk.aws_glue.Schema

Bases: object

See

https://docs.aws.amazon.com/athena/latest/ug/data-types.html

Stability

experimental

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

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

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

Type

classmethod map(key_type, *, input_string, is_primitive)

(experimental) Creates a map of some primitive key type to some value type.

Parameters
  • key_type (Type) – type of key, must be a primitive.

  • 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

Type

classmethod struct(columns)

(experimental) Creates a nested structure containing individually named and typed columns.

Parameters

columns (List[Column]) – the columns of the structure.

Stability

experimental

Return type

Type

classmethod varchar(length)

(experimental) Variable length character data, with a specified length between 1 and 65535.

Parameters

length (Union[int, float]) – length between 1 and 65535.

Stability

experimental

Return type

Type