@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)",
date="2022-05-13T01:13:35.190Z")
public class Schema
extends software.amazon.jsii.JsiiObject
Database myDatabase; Table.Builder.create(this, "MyTable") .database(myDatabase) .tableName("my_table") .columns(List.of(Column.builder() .name("col1") .type(Schema.STRING) .build())) .partitionKeys(List.of(Column.builder() .name("year") .type(Schema.SMALL_INT) .build(), Column.builder() .name("month") .type(Schema.SMALL_INT) .build())) .dataFormat(DataFormat.JSON) .build();
https://docs.aws.amazon.com/athena/latest/ug/data-types.html
Modifier and Type | Field and Description |
---|---|
static Type |
BIG_INT
(experimental) A 64-bit signed INTEGER in two’s complement format, with a minimum value of -2^63 and a maximum value of 2^63-1.
|
static Type |
BINARY |
static Type |
BOOLEAN |
static Type |
DATE
(experimental) Date type.
|
static Type |
DOUBLE |
static Type |
FLOAT |
static Type |
INTEGER
(experimental) A 32-bit signed INTEGER in two’s complement format, with a minimum value of -2^31 and a maximum value of 2^31-1.
|
static Type |
SMALL_INT
(experimental) A 16-bit signed INTEGER in two’s complement format, with a minimum value of -2^15 and a maximum value of 2^15-1.
|
static Type |
STRING
(experimental) Arbitrary-length string type.
|
static Type |
TIMESTAMP
(experimental) Timestamp type (date and time).
|
static Type |
TINY_INT
(experimental) A 8-bit signed INTEGER in two’s complement format, with a minimum value of -2^7 and a maximum value of 2^7-1.
|
Modifier | Constructor and Description |
---|---|
|
Schema() |
protected |
Schema(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Schema(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static Type |
array(Type itemType)
(experimental) Creates an array of some other type.
|
static Type |
decimal(java.lang.Number precision)
(experimental) Creates a decimal type.
|
static Type |
decimal(java.lang.Number precision,
java.lang.Number scale)
(experimental) Creates a decimal type.
|
static Type |
doChar(java.lang.Number length)
(experimental) Fixed length character data, with a specified length between 1 and 255.
|
static Type |
map(Type keyType,
Type valueType)
(experimental) Creates a map of some primitive key type to some value type.
|
static Type |
struct(java.util.List<? extends Column> columns)
(experimental) Creates a nested structure containing individually named and typed columns.
|
static Type |
varchar(java.lang.Number length)
(experimental) Variable length character data, with a specified length between 1 and 65535.
|
public static final Type BIG_INT
public static final Type BINARY
public static final Type BOOLEAN
public static final Type DATE
public static final Type DOUBLE
public static final Type FLOAT
public static final Type INTEGER
public static final Type SMALL_INT
public static final Type STRING
public static final Type TIMESTAMP
public static final Type TINY_INT
protected Schema(software.amazon.jsii.JsiiObjectRef objRef)
protected Schema(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Schema()
public static Type array(Type itemType)
itemType
- type contained by the array. This parameter is required.public static Type doChar(java.lang.Number length)
length
- length between 1 and 255. This parameter is required.public static Type decimal(java.lang.Number precision, java.lang.Number scale)
TODO: Bounds
precision
- the total number of digits. This parameter is required.scale
- the number of digits in fractional part, the default is 0.public static Type decimal(java.lang.Number precision)
TODO: Bounds
precision
- the total number of digits. This parameter is required.public static Type map(Type keyType, Type valueType)
keyType
- type of key, must be a primitive. This parameter is required.valueType
- type fo the value indexed by the key. This parameter is required.public static Type struct(java.util.List<? extends Column> columns)
columns
- the columns of the structure. This parameter is required.public static Type varchar(java.lang.Number length)
length
- length between 1 and 65535. This parameter is required.