Skip to content
v2.273.0

InputFormat Class ​

The format of the source data.

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()
python
InputFormat()
java
new InputFormat()
csharp
new InputFormat()
go
NewInputFormat()

Methods ​

csv(options?: CsvOptions): InputFormat // chainable@staticmethod def csv(options: typing.Optional[CsvOptions] = None) -> InputFormatpublic static InputFormat csv(CsvOptions options)public static InputFormat Csv(CsvOptions? options = null)func Csv(Options CsvOptions) InputFormatstatic#
CSV format.
dynamoDBJson(): InputFormat // chainable@staticmethod def dynamo_db_json() -> InputFormatpublic static InputFormat dynamoDBJson()public static InputFormat DynamoDBJson()func DynamoDBJson() InputFormatstatic#
DynamoDB JSON format.
ion(): InputFormat // chainable@staticmethod def ion() -> InputFormatpublic static InputFormat ion()public static InputFormat Ion()func Ion() InputFormatstatic#
Amazon Ion format.