# Type

The type of a column in a table schema.

Instances are opaque: obtain one from a `Schema` factory (for example
`Schema.STRING`, `Schema.decimal(...)`, `Schema.array(...)`) or, for a type the
`Schema` factories don't model, from `Schema.custom(...)`.

- Source: [`aws-glue/lib/schema.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-glue/lib/schema.ts#L33)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

```ts
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: 'NOW-3YEARS',
      max: 'NOW',
      format: 'yyyy-MM-dd',
    }),
  },
});
```

## Properties

- `inputString`: string — Glue InputString for this type.

- `isPrimitive`: boolean — Indicates whether this type is a primitive data type.
