InputFormat

class aws_cdk.aws_dynamodb.InputFormat

Bases: object

The format of the source data.

ExampleMetadata:

infused

Example:

import aws_cdk as cdk
import aws_cdk.aws_s3 as s3

# bucket: s3.IBucket


app = cdk.App()
stack = cdk.Stack(app, "Stack")

dynamodb.Table(stack, "Table",
    partition_key=dynamodb.Attribute(
        name="id",
        type=dynamodb.AttributeType.STRING
    ),
    import_source=dynamodb.ImportSourceSpecification(
        compression_type=dynamodb.InputCompressionType.GZIP,
        input_format=dynamodb.InputFormat.dynamo_dBJson(),
        bucket=bucket,
        key_prefix="prefix"
    )
)

Static Methods

classmethod csv(*, delimiter=None, header_list=None)

CSV format.

Parameters:
  • delimiter (Optional[str]) – The delimiter used for separating items in the CSV file being imported. Valid delimiters are as follows: - comma (,) - tab (\t) - colon (:) - semicolon (;) - pipe (|) - space (`` ``) Default: - use comma as a delimiter.

  • header_list (Optional[Sequence[str]]) – List of the headers used to specify a common header for all source CSV files being imported. NOTE: If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header. Default: - the first line of the CSV file is treated as the header

Return type:

InputFormat

classmethod dynamo_db_json()

DynamoDB JSON format.

Return type:

InputFormat

classmethod ion()

Amazon Ion format.

Return type:

InputFormat