# TableInputProperty

A structure used to define a table.

- Source: Generated at build time
- Type last changed: v2.253.0 · 6 May 2026

## 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

- `description`: string — A description of the table.

- `name`: string — The table name.

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

- `owner`: string — The table owner.

  Included for Apache Hive compatibility. Not used in the normal course of AWS Glue operations.

- `parameters`: any — These key-value pairs define properties associated with the table.

- `partitionKeys`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.ColumnProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnTable.ColumnProperty.html)[] — 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": []`

- `retention`: number — The retention time for this table.

- `storageDescriptor`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.StorageDescriptorProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnTable.StorageDescriptorProperty.html) — A storage descriptor containing information about the physical storage of this table.

- `tableType`: string — The type of this table.

  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` .

- `targetTable`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.TableIdentifierProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnTable.TableIdentifierProperty.html) — A `TableIdentifier` structure that describes a target table for resource linking.

- `viewDefinition`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.ViewDefinitionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnTable.ViewDefinitionProperty.html) — A structure that defines the view.

- `viewExpandedText`: string — Included for Apache Hive compatibility.

  Not used in the normal course of AWS Glue operations.

- `viewOriginalText`: 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.
