Skip to content
v2.275.0

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',
};

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
A description of the table.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string#
The table name.

For Hive compatibility, this is folded to lowercase when it is stored.

owneroptionalstringowneroptionalstrowneroptionalStringOwneroptionalstringOwneroptional*string#
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.