Class: AWSCDK::StepFunctions::S3CsvItemReaderProps
- Inherits:
-
S3FileItemReaderProps
- Object
- S3FileItemReaderProps
- AWSCDK::StepFunctions::S3CsvItemReaderProps
- Defined in:
- step_functions/s3_csv_item_reader_props.rb
Overview
Properties for configuring an Item Reader that iterates over items in a CSV file in S3.
Instance Attribute Summary collapse
-
#bucket ⇒ AWSCDK::S3::IBucket?
readonly
S3 Bucket containing objects to iterate over or a file with a list to iterate over.
-
#bucket_name_path ⇒ String?
readonly
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
-
#csv_delimiter ⇒ AWSCDK::StepFunctions::CsvDelimiter?
readonly
Delimiter used in a CSV file.
-
#csv_headers ⇒ AWSCDK::StepFunctions::CsvHeaders?
readonly
CSV file header configuration.
-
#key ⇒ String
readonly
Key of file stored in S3 bucket containing an array to iterate over.
-
#max_items ⇒ Numeric?
readonly
Limits the number of items passed to the Distributed Map state.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bucket: nil, bucket_name_path: nil, max_items: nil, key:, csv_delimiter: nil, csv_headers: nil) ⇒ S3CsvItemReaderProps
constructor
A new instance of S3CsvItemReaderProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bucket: nil, bucket_name_path: nil, max_items: nil, key:, csv_delimiter: nil, csv_headers: nil) ⇒ S3CsvItemReaderProps
Returns a new instance of S3CsvItemReaderProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 13 def initialize(bucket: nil, bucket_name_path: nil, max_items: nil, key:, csv_delimiter: nil, csv_headers: nil) @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") unless @bucket.nil? @bucket_name_path = bucket_name_path Jsii::Type.check_type(@bucket_name_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketNamePath") unless @bucket_name_path.nil? @max_items = max_items Jsii::Type.check_type(@max_items, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxItems") unless @max_items.nil? @key = key Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") @csv_delimiter = csv_delimiter Jsii::Type.check_type(@csv_delimiter, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5Dc3ZEZWxpbWl0ZXIifQ==")), "csvDelimiter") unless @csv_delimiter.nil? @csv_headers = csv_headers Jsii::Type.check_type(@csv_headers, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5Dc3ZIZWFkZXJzIn0=")), "csvHeaders") unless @csv_headers.nil? end |
Instance Attribute Details
#bucket ⇒ AWSCDK::S3::IBucket? (readonly)
Default: - S3 bucket will be determined from
S3 Bucket containing objects to iterate over or a file with a list to iterate over.
33 34 35 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 33 def bucket @bucket end |
#bucket_name_path ⇒ String? (readonly)
Default: - S3 bucket will be determined from
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
39 40 41 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 39 def bucket_name_path @bucket_name_path end |
#csv_delimiter ⇒ AWSCDK::StepFunctions::CsvDelimiter? (readonly)
Default: undefined - Default setting is COMMA.
Delimiter used in a CSV file.
53 54 55 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 53 def csv_delimiter @csv_delimiter end |
#csv_headers ⇒ AWSCDK::StepFunctions::CsvHeaders? (readonly)
Default: - CsvHeaders with CsvHeadersLocation.FIRST_ROW
CSV file header configuration.
58 59 60 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 58 def csv_headers @csv_headers end |
#key ⇒ String (readonly)
Key of file stored in S3 bucket containing an array to iterate over.
48 49 50 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 48 def key @key end |
#max_items ⇒ Numeric? (readonly)
Default: - Distributed Map state will iterate over all items provided by the ItemReader
Limits the number of items passed to the Distributed Map state.
44 45 46 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 44 def max_items @max_items end |
Class Method Details
.jsii_properties ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 60 def self.jsii_properties { :bucket => "bucket", :bucket_name_path => "bucketNamePath", :max_items => "maxItems", :key => "key", :csv_delimiter => "csvDelimiter", :csv_headers => "csvHeaders", } end |
Instance Method Details
#to_jsii ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'step_functions/s3_csv_item_reader_props.rb', line 71 def to_jsii result = {} result.merge!(super) result.merge!({ "bucket" => @bucket, "bucketNamePath" => @bucket_name_path, "maxItems" => @max_items, "key" => @key, "csvDelimiter" => @csv_delimiter, "csvHeaders" => @csv_headers, }) result.compact end |