Class: AWSCDK::DynamoDB::CsvOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::CsvOptions
- Defined in:
- dynamo_db/csv_options.rb
Overview
The options for imported source files in CSV format.
Instance Attribute Summary collapse
-
#delimiter ⇒ String?
readonly
The delimiter used for separating items in the CSV file being imported.
-
#header_list ⇒ Array<String>?
readonly
List of the headers used to specify a common header for all source CSV files being imported.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(delimiter: nil, header_list: nil) ⇒ CsvOptions
constructor
A new instance of CsvOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(delimiter: nil, header_list: nil) ⇒ CsvOptions
Returns a new instance of CsvOptions.
9 10 11 12 13 14 |
# File 'dynamo_db/csv_options.rb', line 9 def initialize(delimiter: nil, header_list: nil) @delimiter = delimiter Jsii::Type.check_type(@delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delimiter") unless @delimiter.nil? @header_list = header_list Jsii::Type.check_type(@header_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "headerList") unless @header_list.nil? end |
Instance Attribute Details
#delimiter ⇒ String? (readonly)
Default: - use comma as a delimiter.
The delimiter used for separating items in the CSV file being imported.
Valid delimiters are as follows:
- comma (
,) - tab (
\t) - colon (
:) - semicolon (
;) - pipe (
|) - space (
)
29 30 31 |
# File 'dynamo_db/csv_options.rb', line 29 def delimiter @delimiter end |
#header_list ⇒ Array<String>? (readonly)
Default: - the first line of the CSV file is treated as the header
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 first line of each CSV file is treated as the header.
37 38 39 |
# File 'dynamo_db/csv_options.rb', line 37 def header_list @header_list end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 |
# File 'dynamo_db/csv_options.rb', line 39 def self.jsii_properties { :delimiter => "delimiter", :header_list => "headerList", } end |
Instance Method Details
#to_jsii ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'dynamo_db/csv_options.rb', line 46 def to_jsii result = {} result.merge!({ "delimiter" => @delimiter, "headerList" => @header_list, }) result.compact end |