Class: AWSCDK::StepFunctions::CsvHeaders

Inherits:
Jsii::Object
  • Object
show all
Defined in:
step_functions/csv_headers.rb

Overview

Configuration for CSV header options for a CSV Item Reader.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CsvHeaders

Returns a new instance of CsvHeaders.

Raises:

  • (NoMethodError)


8
9
10
# File 'step_functions/csv_headers.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_stepfunctions.CsvHeaders does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.jsii_overridable_methodsObject



12
13
14
15
16
17
# File 'step_functions/csv_headers.rb', line 12

def self.jsii_overridable_methods
  {
    :header_location => { kind: :property, name: "headerLocation", is_optional: false },
    :headers => { kind: :property, name: "headers", is_optional: true },
  }
end

.use(headers) ⇒ AWSCDK::StepFunctions::CsvHeaders

Configures S3CsvItemReader to use the headers provided in the headers parameter.

Parameters:

  • headers (Array<String>)
    • List of headers.

Returns:

  • (AWSCDK::StepFunctions::CsvHeaders)
    • CsvHeaders


23
24
25
26
# File 'step_functions/csv_headers.rb', line 23

def self.use(headers)
  Jsii::Type.check_type(headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "headers")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions.CsvHeaders", "use", [headers])
end

.use_first_rowAWSCDK::StepFunctions::CsvHeaders

Configures S3CsvItemReader to read headers from the first row of the CSV file.

Returns:

  • (AWSCDK::StepFunctions::CsvHeaders)
    • CsvHeaders


31
32
33
# File 'step_functions/csv_headers.rb', line 31

def self.use_first_row()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions.CsvHeaders", "useFirstRow", [])
end

Instance Method Details

#header_locationAWSCDK::StepFunctions::CsvHeaderLocation

Location of headers in CSV file.



38
39
40
# File 'step_functions/csv_headers.rb', line 38

def header_location()
  jsii_get_property("headerLocation")
end

#headersArray<String>?

List of headers if headerLocation is GIVEN.

Returns:

  • (Array<String>, nil)


45
46
47
# File 'step_functions/csv_headers.rb', line 45

def headers()
  jsii_get_property("headers")
end