S3CsvItemReaderProps

class aws_cdk.aws_stepfunctions.S3CsvItemReaderProps(*, bucket=None, bucket_name_path=None, max_items=None, key, csv_delimiter=None, csv_headers=None)

Bases: S3FileItemReaderProps

Properties for configuring an Item Reader that iterates over items in a CSV file in S3.

Parameters:
  • bucket (Optional[IBucket]) – S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from

  • bucket_name_path (Optional[str]) – S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from

  • max_items (Union[int, float, None]) – Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader

  • key (str) – Key of file stored in S3 bucket containing an array to iterate over.

  • csv_delimiter (Optional[CsvDelimiter]) – Delimiter used in a CSV file. Default: undefined - Default setting is COMMA.

  • csv_headers (Optional[CsvHeaders]) – CSV file header configuration. Default: - CsvHeaders with CsvHeadersLocation.FIRST_ROW

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3
from aws_cdk import aws_stepfunctions as stepfunctions

# bucket: s3.Bucket
# csv_headers: stepfunctions.CsvHeaders

s3_csv_item_reader_props = stepfunctions.S3CsvItemReaderProps(
    key="key",

    # the properties below are optional
    bucket=bucket,
    bucket_name_path="bucketNamePath",
    csv_delimiter=stepfunctions.CsvDelimiter.COMMA,
    csv_headers=csv_headers,
    max_items=123
)

Attributes

bucket

S3 Bucket containing objects to iterate over or a file with a list to iterate over.

Default:
  • S3 bucket will be determined from

See:

bucketNamePath

bucket_name_path

S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.

Default:
  • S3 bucket will be determined from

See:

bucket

csv_delimiter

Delimiter used in a CSV file.

Default:

undefined - Default setting is COMMA.

csv_headers

CSV file header configuration.

Default:
  • CsvHeaders with CsvHeadersLocation.FIRST_ROW

key

Key of file stored in S3 bucket containing an array to iterate over.

max_items

Limits the number of items passed to the Distributed Map state.

Default:
  • Distributed Map state will iterate over all items provided by the ItemReader