interface TableProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.TableProps |
Java | software.amazon.awscdk.services.glue.TableProps |
Python | aws_cdk.aws_glue.TableProps |
TypeScript (source) | @aws-cdk/aws-glue ยป TableProps |
Example
declare const myDatabase: glue.Database;
new glue.Table(this, 'MyTable', {
database: myDatabase,
tableName: 'my_table',
columns: [{
name: 'col1',
type: glue.Schema.STRING,
}],
partitionKeys: [{
name: 'year',
type: glue.Schema.SMALL_INT,
}, {
name: 'month',
type: glue.Schema.SMALL_INT,
}],
dataFormat: glue.DataFormat.JSON,
});
Properties
| Name | Type | Description |
|---|---|---|
| columns | Column[] | Columns of the table. |
| data | Data | Storage type of the table's data. |
| database | IDatabase | Database in which to store the table. |
| table | string | Name of the table. |
| bucket? | IBucket | S3 bucket in which to store data. |
| compressed? | boolean | Indicates whether the table's data is compressed or not. |
| description? | string | Description of the table. |
| encryption? | Table | The kind of encryption to secure the data with. |
| encryption | IKey | External KMS key to use for bucket encryption. |
| partition | Partition[] | Partition indexes on the table. |
| partition | Column[] | Partition columns of the table. |
| s3 | string | S3 prefix under which table objects are stored. |
| stored | boolean | Indicates whether the table data is stored in subdirectories. |
columns
Type:
Column[]
Columns of the table.
dataFormat
Type:
Data
Storage type of the table's data.
database
Type:
IDatabase
Database in which to store the table.
tableName
Type:
string
Name of the table.
bucket?
Type:
IBucket
(optional, default: one is created for you)
S3 bucket in which to store data.
compressed?
Type:
boolean
(optional, default: false)
Indicates whether the table's data is compressed or not.
description?
Type:
string
(optional, default: generated)
Description of the table.
encryption?
Type:
Table
(optional, default: Unencrypted)
The kind of encryption to secure the data with.
You can only provide this option if you are not explicitly passing in a bucket.
If you choose SSE-KMS, you can provide an un-managed KMS key with encryptionKey.
If you choose CSE-KMS, you must provide an un-managed KMS key with encryptionKey.
encryptionKey?
Type:
IKey
(optional, default: key is managed by KMS.)
External KMS key to use for bucket encryption.
The encryption property must be SSE-KMS or CSE-KMS.
partitionIndexes?
Type:
Partition[]
(optional, default: table has no partition indexes)
Partition indexes on the table.
A maximum of 3 indexes are allowed on a table. Keys in the index must be part of the table's partition keys.
partitionKeys?
Type:
Column[]
(optional, default: table is not partitioned)
Partition columns of the table.
s3Prefix?
Type:
string
(optional, default: No prefix. The data will be stored under the root of the bucket.)
S3 prefix under which table objects are stored.
storedAsSubDirectories?
Type:
boolean
(optional, default: false)
Indicates whether the table data is stored in subdirectories.

.NET
Java
Python
TypeScript (