# InputFormat

The format of the source data.

- Source: [`aws-dynamodb/lib/table.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-dynamodb/lib/table.ts#L132)
- Type last changed: v2.123.0 · 24 Jan 2024

## Example

```ts
import * as cdk from 'aws-cdk-lib';
import * as s3 from 'aws-cdk-lib/aws-s3';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack');

declare const bucket: s3.IBucket;

new dynamodb.Table(stack, 'Table', {
  partitionKey: {
    name: 'id',
    type: dynamodb.AttributeType.STRING,
  },
  importSource: {
    compressionType: dynamodb.InputCompressionType.GZIP,
    inputFormat: dynamodb.InputFormat.dynamoDBJson(),
    bucket,
    keyPrefix: 'prefix',
  },
});
```

## Initializer

```ts
new InputFormat()
```

## Methods

- `csv(options?: CsvOptions): InputFormat // chainable` (static) — CSV format.

- `dynamoDBJson(): InputFormat // chainable` (static) — DynamoDB JSON format.

- `ion(): InputFormat // chainable` (static) — Amazon Ion format.
