TableBaseProps Struct
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';
declare const database: glue.Database;
declare const dataFormat: glue.DataFormat;
declare const partitionProjectionConfiguration: glue.PartitionProjectionConfiguration;
declare const storageParameter: glue.StorageParameter;
declare const type: glue.Type;
const tableBaseProps: glue.TableBaseProps = {
columns: [{
name: 'name',
type: type,
// the properties below are optional
comment: 'comment',
}],
database: database,
dataFormat: dataFormat,
// the properties below are optional
compressed: false,
description: 'description',
enablePartitionFiltering: false,
hasEncryptedData: false,
parameters: {
parametersKey: 'parameters',
},
partitionIndexes: [{
keyNames: ['keyNames'],
// the properties below are optional
indexName: 'indexName',
}],
partitionKeys: [{
name: 'name',
type: type,
// the properties below are optional
comment: 'comment',
}],
partitionProjection: {
partitionProjectionKey: partitionProjectionConfiguration,
},
storageParameters: [storageParameter],
storedAsSubDirectories: false,
tableName: 'tableName',
};
Properties
columnsColumn[]columnstyping.List[Column]columnsList<Column>ColumnsColumn[]Columns*[]Columnrequired#dataFormatDataFormatdata_formatDataFormatdataFormatDataFormatDataFormatDataFormatDataFormatDataFormatrequired#enablePartitionFilteringbooleanenable_partition_filteringboolenablePartitionFilteringBooleanEnablePartitionFilteringboolEnablePartitionFiltering*bool= The parameter is not defined#hasEncryptedDatabooleanhas_encrypted_databoolhasEncryptedDataBooleanHasEncryptedDataboolHasEncryptedData*bool= true#notes
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{ [key: string]: string }parameterstyping.Mapping[str, str]parametersMap<String, String>ParametersIDictionary<string, string>Parameters*map[string]*string= The parameter is not defined#The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.
partitionIndexesPartitionIndex[]partition_indexestyping.List[PartitionIndex]partitionIndexesList<PartitionIndex>PartitionIndexesPartitionIndex[]PartitionIndexes*[]PartitionIndex= table has no partition indexes#A maximum of 3 indexes are allowed on a table. Keys in the index must be part of the table's partition keys.
partitionKeysColumn[]partition_keystyping.List[Column]partitionKeysList<Column>PartitionKeysColumn[]PartitionKeys*[]Column= table is not partitioned#partitionProjection{ [key: string]: PartitionProjectionConfiguration }partition_projectiontyping.Mapping[str, PartitionProjectionConfiguration]partitionProjectionMap<String, PartitionProjectionConfiguration>PartitionProjectionIDictionary<string, PartitionProjectionConfiguration>PartitionProjection*map[string]PartitionProjectionConfiguration= No partition projection#Partition projection allows Athena to automatically add new partitions without requiring ALTER TABLE ADD PARTITION statements.
storageParametersStorageParameter[]storage_parameterstyping.List[StorageParameter]storageParametersList<StorageParameter>StorageParametersStorageParameter[]StorageParameters*[]StorageParameter= The parameter is not defined#notes · example
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.
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,
});
storedAsSubDirectoriesbooleanstored_as_sub_directoriesboolstoredAsSubDirectoriesBooleanStoredAsSubDirectoriesboolStoredAsSubDirectories*bool= false#