TableInputProperty Struct
A structure used to define a table.
Example
ts
// 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 parameters: any;
declare const skewedColumnValueLocationMaps: any;
const tableInputProperty: glue.CfnTable.TableInputProperty = {
description: 'description',
name: 'name',
owner: 'owner',
parameters: parameters,
partitionKeys: [{
name: 'name',
// the properties below are optional
comment: 'comment',
type: 'type',
}],
retention: 123,
storageDescriptor: {
bucketColumns: ['bucketColumns'],
columns: [{
name: 'name',
// the properties below are optional
comment: 'comment',
type: 'type',
}],
compressed: false,
inputFormat: 'inputFormat',
location: 'location',
numberOfBuckets: 123,
outputFormat: 'outputFormat',
parameters: parameters,
schemaReference: {
schemaId: {
registryName: 'registryName',
schemaArn: 'schemaArn',
schemaName: 'schemaName',
},
schemaVersionId: 'schemaVersionId',
schemaVersionNumber: 123,
},
serdeInfo: {
name: 'name',
parameters: parameters,
serializationLibrary: 'serializationLibrary',
},
skewedInfo: {
skewedColumnNames: ['skewedColumnNames'],
skewedColumnValueLocationMaps: skewedColumnValueLocationMaps,
skewedColumnValues: ['skewedColumnValues'],
},
sortColumns: [{
column: 'column',
sortOrder: 123,
}],
storedAsSubDirectories: false,
},
tableType: 'tableType',
targetTable: {
catalogId: 'catalogId',
databaseName: 'databaseName',
name: 'name',
region: 'region',
},
viewDefinition: {
definer: 'definer',
isProtected: false,
representations: [{
dialect: 'dialect',
dialectVersion: 'dialectVersion',
validationConnection: 'validationConnection',
viewExpandedText: 'viewExpandedText',
viewOriginalText: 'viewOriginalText',
}],
subObjects: ['subObjects'],
},
viewExpandedText: 'viewExpandedText',
viewOriginalText: 'viewOriginalText',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue
# parameters: Any
# skewed_column_value_location_maps: Any
table_input_property = glue.CfnTable.TableInputProperty(
description="description",
name="name",
owner="owner",
parameters=parameters,
partition_keys=[glue.CfnTable.ColumnProperty(
name="name",
# the properties below are optional
comment="comment",
type="type"
)],
retention=123,
storage_descriptor=glue.CfnTable.StorageDescriptorProperty(
bucket_columns=["bucketColumns"],
columns=[glue.CfnTable.ColumnProperty(
name="name",
# the properties below are optional
comment="comment",
type="type"
)],
compressed=False,
input_format="inputFormat",
location="location",
number_of_buckets=123,
output_format="outputFormat",
parameters=parameters,
schema_reference=glue.CfnTable.SchemaReferenceProperty(
schema_id=glue.CfnTable.SchemaIdProperty(
registry_name="registryName",
schema_arn="schemaArn",
schema_name="schemaName"
),
schema_version_id="schemaVersionId",
schema_version_number=123
),
serde_info=glue.CfnTable.SerdeInfoProperty(
name="name",
parameters=parameters,
serialization_library="serializationLibrary"
),
skewed_info=glue.CfnTable.SkewedInfoProperty(
skewed_column_names=["skewedColumnNames"],
skewed_column_value_location_maps=skewed_column_value_location_maps,
skewed_column_values=["skewedColumnValues"]
),
sort_columns=[glue.CfnTable.OrderProperty(
column="column",
sort_order=123
)],
stored_as_sub_directories=False
),
table_type="tableType",
target_table=glue.CfnTable.TableIdentifierProperty(
catalog_id="catalogId",
database_name="databaseName",
name="name",
region="region"
),
view_definition=glue.CfnTable.ViewDefinitionProperty(
definer="definer",
is_protected=False,
representations=[glue.CfnTable.ViewRepresentationProperty(
dialect="dialect",
dialect_version="dialectVersion",
validation_connection="validationConnection",
view_expanded_text="viewExpandedText",
view_original_text="viewOriginalText"
)],
sub_objects=["subObjects"]
),
view_expanded_text="viewExpandedText",
view_original_text="viewOriginalText"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;
Object parameters;
Object skewedColumnValueLocationMaps;
TableInputProperty tableInputProperty = TableInputProperty.builder()
.description("description")
.name("name")
.owner("owner")
.parameters(parameters)
.partitionKeys(List.of(ColumnProperty.builder()
.name("name")
// the properties below are optional
.comment("comment")
.type("type")
.build()))
.retention(123)
.storageDescriptor(StorageDescriptorProperty.builder()
.bucketColumns(List.of("bucketColumns"))
.columns(List.of(ColumnProperty.builder()
.name("name")
// the properties below are optional
.comment("comment")
.type("type")
.build()))
.compressed(false)
.inputFormat("inputFormat")
.location("location")
.numberOfBuckets(123)
.outputFormat("outputFormat")
.parameters(parameters)
.schemaReference(SchemaReferenceProperty.builder()
.schemaId(SchemaIdProperty.builder()
.registryName("registryName")
.schemaArn("schemaArn")
.schemaName("schemaName")
.build())
.schemaVersionId("schemaVersionId")
.schemaVersionNumber(123)
.build())
.serdeInfo(SerdeInfoProperty.builder()
.name("name")
.parameters(parameters)
.serializationLibrary("serializationLibrary")
.build())
.skewedInfo(SkewedInfoProperty.builder()
.skewedColumnNames(List.of("skewedColumnNames"))
.skewedColumnValueLocationMaps(skewedColumnValueLocationMaps)
.skewedColumnValues(List.of("skewedColumnValues"))
.build())
.sortColumns(List.of(OrderProperty.builder()
.column("column")
.sortOrder(123)
.build()))
.storedAsSubDirectories(false)
.build())
.tableType("tableType")
.targetTable(TableIdentifierProperty.builder()
.catalogId("catalogId")
.databaseName("databaseName")
.name("name")
.region("region")
.build())
.viewDefinition(ViewDefinitionProperty.builder()
.definer("definer")
.isProtected(false)
.representations(List.of(ViewRepresentationProperty.builder()
.dialect("dialect")
.dialectVersion("dialectVersion")
.validationConnection("validationConnection")
.viewExpandedText("viewExpandedText")
.viewOriginalText("viewOriginalText")
.build()))
.subObjects(List.of("subObjects"))
.build())
.viewExpandedText("viewExpandedText")
.viewOriginalText("viewOriginalText")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;
var parameters;
var skewedColumnValueLocationMaps;
var tableInputProperty = new TableInputProperty {
Description = "description",
Name = "name",
Owner = "owner",
Parameters = parameters,
PartitionKeys = new [] { new ColumnProperty {
Name = "name",
// the properties below are optional
Comment = "comment",
Type = "type"
} },
Retention = 123,
StorageDescriptor = new StorageDescriptorProperty {
BucketColumns = new [] { "bucketColumns" },
Columns = new [] { new ColumnProperty {
Name = "name",
// the properties below are optional
Comment = "comment",
Type = "type"
} },
Compressed = false,
InputFormat = "inputFormat",
Location = "location",
NumberOfBuckets = 123,
OutputFormat = "outputFormat",
Parameters = parameters,
SchemaReference = new SchemaReferenceProperty {
SchemaId = new SchemaIdProperty {
RegistryName = "registryName",
SchemaArn = "schemaArn",
SchemaName = "schemaName"
},
SchemaVersionId = "schemaVersionId",
SchemaVersionNumber = 123
},
SerdeInfo = new SerdeInfoProperty {
Name = "name",
Parameters = parameters,
SerializationLibrary = "serializationLibrary"
},
SkewedInfo = new SkewedInfoProperty {
SkewedColumnNames = new [] { "skewedColumnNames" },
SkewedColumnValueLocationMaps = skewedColumnValueLocationMaps,
SkewedColumnValues = new [] { "skewedColumnValues" }
},
SortColumns = new [] { new OrderProperty {
Column = "column",
SortOrder = 123
} },
StoredAsSubDirectories = false
},
TableType = "tableType",
TargetTable = new TableIdentifierProperty {
CatalogId = "catalogId",
DatabaseName = "databaseName",
Name = "name",
Region = "region"
},
ViewDefinition = new ViewDefinitionProperty {
Definer = "definer",
IsProtected = false,
Representations = new [] { new ViewRepresentationProperty {
Dialect = "dialect",
DialectVersion = "dialectVersion",
ValidationConnection = "validationConnection",
ViewExpandedText = "viewExpandedText",
ViewOriginalText = "viewOriginalText"
} },
SubObjects = new [] { "subObjects" }
},
ViewExpandedText = "viewExpandedText",
ViewOriginalText = "viewOriginalText"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var parameters interface{}
var skewedColumnValueLocationMaps interface{}
tableInputProperty := &TableInputProperty{
Description: jsii.String("description"),
Name: jsii.String("name"),
Owner: jsii.String("owner"),
Parameters: parameters,
PartitionKeys: []interface{}{
&ColumnProperty{
Name: jsii.String("name"),
// the properties below are optional
Comment: jsii.String("comment"),
Type: jsii.String("type"),
},
},
Retention: jsii.Number(123),
StorageDescriptor: &StorageDescriptorProperty{
BucketColumns: []*string{
jsii.String("bucketColumns"),
},
Columns: []interface{}{
&ColumnProperty{
Name: jsii.String("name"),
// the properties below are optional
Comment: jsii.String("comment"),
Type: jsii.String("type"),
},
},
Compressed: jsii.Boolean(false),
InputFormat: jsii.String("inputFormat"),
Location: jsii.String("location"),
NumberOfBuckets: jsii.Number(123),
OutputFormat: jsii.String("outputFormat"),
Parameters: parameters,
SchemaReference: &SchemaReferenceProperty{
SchemaId: &SchemaIdProperty{
RegistryName: jsii.String("registryName"),
SchemaArn: jsii.String("schemaArn"),
SchemaName: jsii.String("schemaName"),
},
SchemaVersionId: jsii.String("schemaVersionId"),
SchemaVersionNumber: jsii.Number(123),
},
SerdeInfo: &SerdeInfoProperty{
Name: jsii.String("name"),
Parameters: parameters,
SerializationLibrary: jsii.String("serializationLibrary"),
},
SkewedInfo: &SkewedInfoProperty{
SkewedColumnNames: []*string{
jsii.String("skewedColumnNames"),
},
SkewedColumnValueLocationMaps: skewedColumnValueLocationMaps,
SkewedColumnValues: []*string{
jsii.String("skewedColumnValues"),
},
},
SortColumns: []interface{}{
&OrderProperty{
Column: jsii.String("column"),
SortOrder: jsii.Number(123),
},
},
StoredAsSubDirectories: jsii.Boolean(false),
},
TableType: jsii.String("tableType"),
TargetTable: &TableIdentifierProperty{
CatalogId: jsii.String("catalogId"),
DatabaseName: jsii.String("databaseName"),
Name: jsii.String("name"),
Region: jsii.String("region"),
},
ViewDefinition: &ViewDefinitionProperty{
Definer: jsii.String("definer"),
IsProtected: jsii.Boolean(false),
Representations: []interface{}{
&ViewRepresentationProperty{
Dialect: jsii.String("dialect"),
DialectVersion: jsii.String("dialectVersion"),
ValidationConnection: jsii.String("validationConnection"),
ViewExpandedText: jsii.String("viewExpandedText"),
ViewOriginalText: jsii.String("viewOriginalText"),
},
},
SubObjects: []*string{
jsii.String("subObjects"),
},
},
ViewExpandedText: jsii.String("viewExpandedText"),
ViewOriginalText: jsii.String("viewOriginalText"),
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#A description of the table.
The table name.
For Hive compatibility, this is folded to lowercase when it is stored.
The table owner.
Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.
parametersoptionalanyparametersoptionalAnyparametersoptionalObjectParametersoptionalobjectParametersoptionalinterface{}#These key-value pairs define properties associated with the table.
partitionKeysoptionalIResolvable | IResolvable | CfnTable.ColumnProperty[]partition_keysoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ColumnProperty]]]partitionKeysoptionalIResolvablePartitionKeysoptionalIResolvablePartitionKeysoptionalinterface{}#A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
When you create a table used by Amazon Athena, and you do not specify any partitionKeys , you must at least set the value of partitionKeys to an empty list. For example:
"PartitionKeys": []
retentionoptionalnumberretentionoptionalint | floatretentionoptionalNumberRetentionoptionaldoubleRetentionoptional*float64#The retention time for this table.
storageDescriptoroptionalIResolvable | CfnTable.StorageDescriptorPropertystorage_descriptoroptionaltyping.Union[IResolvable, StorageDescriptorProperty]storageDescriptoroptionalIResolvableStorageDescriptoroptionalIResolvableStorageDescriptoroptionalinterface{}#A storage descriptor containing information about the physical storage of this table.
tableTypeoptionalstringtable_typeoptionalstrtableTypeoptionalStringTableTypeoptionalstringTableTypeoptional*string#The type of this table.
notes
AWS Glue will create tables with the EXTERNAL_TABLE type. Other services, such as Athena, may create tables with additional table types.
AWS Glue related table types:
- EXTERNAL_TABLE - Hive compatible attribute - indicates a non-Hive managed table.
- GOVERNED - Used by AWS Lake Formation . The AWS Glue Data Catalog understands
GOVERNED.
targetTableoptionalIResolvable | CfnTable.TableIdentifierPropertytarget_tableoptionaltyping.Union[IResolvable, TableIdentifierProperty]targetTableoptionalIResolvableTargetTableoptionalIResolvableTargetTableoptionalinterface{}#A `TableIdentifier` structure that describes a target table for resource linking.
viewDefinitionoptionalIResolvable | CfnTable.ViewDefinitionPropertyview_definitionoptionaltyping.Union[IResolvable, ViewDefinitionProperty]viewDefinitionoptionalIResolvableViewDefinitionoptionalIResolvableViewDefinitionoptionalinterface{}#A structure that defines the view.
viewExpandedTextoptionalstringview_expanded_textoptionalstrviewExpandedTextoptionalStringViewExpandedTextoptionalstringViewExpandedTextoptional*string#Included for Apache Hive compatibility.
Not used in the normal course of AWS Glue operations.
viewOriginalTextoptionalstringview_original_textoptionalstrviewOriginalTextoptionalStringViewOriginalTextoptionalstringViewOriginalTextoptional*string#Included for Apache Hive compatibility.
Not used in the normal course of AWS Glue operations. If the table is a VIRTUAL_VIEW , certain Athena configuration encoded in base64.