interface S3TableProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.S3TableProps |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#S3TableProps |
Java | software.amazon.awscdk.services.glue.alpha.S3TableProps |
Python | aws_cdk.aws_glue_alpha.S3TableProps |
TypeScript (source) | @aws-cdk/aws-glue-alpha ยป S3TableProps |
Implements
Table
Example
declare const myDatabase: glue.Database;
new glue.S3Table(this, 'MyTable', {
database: myDatabase,
columns: [{
name: 'data',
type: glue.Schema.STRING,
}],
partitionKeys: [{
name: 'date',
type: glue.Schema.STRING,
}],
dataFormat: glue.DataFormat.JSON,
partitionProjection: {
date: glue.PartitionProjectionConfiguration.date({
min: '2020-01-01',
max: '2023-12-31',
format: 'yyyy-MM-dd',
interval: 1, // optional, defaults to 1
intervalUnit: glue.DateIntervalUnit.DAYS, // optional: YEARS, MONTHS, WEEKS, DAYS, HOURS, MINUTES, SECONDS
}),
},
});
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. |
| client | Table | Client-side encryption (CSE-KMS) for the table's data. |
| compressed? | boolean | Indicates whether the table's data is compressed or not. |
| description? | string | Description of the table. |
| enable | boolean | Enables partition filtering. |
| has | boolean | Whether the data stored in the table is encrypted. |
| parameters? | { [string]: string } | The key/value pairs define properties associated with the table. |
| partition | Partition[] | Partition indexes on the table. |
| partition | Column[] | Partition columns of the table. |
| partition | { [string]: Partition } | Partition projection configuration for this table. |
| s3 | string | S3 prefix under which table objects are stored. |
| storage? | S3 | Where the table's data is stored: a bucket created and managed by the table, or an existing bucket you provide. |
| storage | Storage[] | The user-supplied properties for the description of the physical storage of this table. |
| stored | boolean | Indicates whether the table data is stored in subdirectories. |
| table | string | Name of the table. |
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.
clientSideEncryption?
Type:
Table
(optional, default: no client-side encryption)
Client-side encryption (CSE-KMS) for the table's data.
Independent of the bucket's server-side encryption, and valid whether the bucket is managed or provided.
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.
enablePartitionFiltering?
Type:
boolean
(optional, default: The parameter is not defined)
Enables partition filtering.
hasEncryptedData?
Type:
boolean
(optional, default: true)
Whether the data stored in the table is encrypted.
This sets the has_encrypted_data table parameter. Athena reads it when
querying client-side (CSE-KMS) encrypted datasets; for server-side
encrypted (SSE-S3 / SSE-KMS) or unencrypted data it has no effect, since
Amazon S3 decrypts server-side encrypted objects transparently.
Do not also set has_encrypted_data through parameters - use this
property instead. A conflicting value in parameters is rejected.
parameters?
Type:
{ [string]: string }
(optional, default: The parameter is not defined)
The key/value pairs define properties associated with the table.
The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
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.
partitionProjection?
Type:
{ [string]: Partition }
(optional, default: No partition projection)
Partition projection configuration for this table.
Partition projection allows Athena to automatically add new partitions
without requiring ALTER TABLE ADD PARTITION statements.
See also: https://docs.aws.amazon.com/athena/latest/ug/partition-projection.html
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.
When the table shares a bucket with other tables or consumers, set this so
that the grant* methods scope S3 access to this table's data. Without a
prefix, those grants cover the entire bucket.
storage?
Type:
S3
(optional, default: a managed bucket with S3-managed (SSE-S3) encryption)
Where the table's data is stored: a bucket created and managed by the table, or an existing bucket you provide.
storageParameters?
Type:
Storage[]
(optional, default: The parameter is not defined)
The user-supplied properties for the description of the physical storage of this table.
These properties help describe the format of the data that is stored within the crawled data sources.
The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
Some keys will be auto-populated by glue crawlers, however, you can override them by specifying the key and value in this property.
See also: [https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under "TABLE PROPERTIES"](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html#r_CREATE_EXTERNAL_TABLE-parameters - under "TABLE PROPERTIES") Example
declare const glueDatabase: glue.IDatabase;
const table = new glue.S3Table(this, 'Table', {
storageParameters: [
glue.StorageParameter.skipHeaderLineCount(1),
glue.StorageParameter.compressionType(glue.CompressionType.GZIP),
glue.StorageParameter.custom('foo', 'bar'), // Will have no effect
glue.StorageParameter.custom('separatorChar', ','), // Will describe the separator char used in the data
glue.StorageParameter.custom(glue.StorageParameters.WRITE_PARALLEL, 'off'),
],
// ...
database: glueDatabase,
columns: [{
name: 'col1',
type: glue.Schema.STRING,
}],
dataFormat: glue.DataFormat.CSV,
});
storedAsSubDirectories?
Type:
boolean
(optional, default: false)
Indicates whether the table data is stored in subdirectories.
tableName?
Type:
string
(optional, default: generated by CDK.)
Name of the table.

.NET
Go
Java
Python
TypeScript (