Class: AWSCDK::Glue::CfnClassifier::CsvClassifierProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_classifier.rb

Overview

A classifier for custom CSV content.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_single_column: nil, contains_custom_datatype: nil, contains_header: nil, custom_datatype_configured: nil, delimiter: nil, disable_value_trimming: nil, header: nil, name: nil, quote_symbol: nil) ⇒ CsvClassifierProperty

Returns a new instance of CsvClassifierProperty.

Parameters:

  • allow_single_column (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Enables the processing of files that contain only one column.

  • contains_custom_datatype (Array<String>, nil) (defaults to: nil)

    Indicates whether the CSV file contains custom data types.

  • contains_header (String, nil) (defaults to: nil)

    Indicates whether the CSV file contains a header.

  • custom_datatype_configured (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Enables the configuration of custom data types.

  • delimiter (String, nil) (defaults to: nil)

    A custom symbol to denote what separates each column entry in the row.

  • disable_value_trimming (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies not to trim values before identifying the type of column values.

  • header (Array<String>, nil) (defaults to: nil)

    A list of strings representing column names.

  • name (String, nil) (defaults to: nil)

    The name of the classifier.

  • quote_symbol (String, nil) (defaults to: nil)

    A custom symbol to denote what combines content into a single column value.



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'glue/cfn_classifier.rb', line 551

def initialize(allow_single_column: nil, contains_custom_datatype: nil, contains_header: nil, custom_datatype_configured: nil, delimiter: nil, disable_value_trimming: nil, header: nil, name: nil, quote_symbol: nil)
  @allow_single_column = allow_single_column
  Jsii::Type.check_type(@allow_single_column, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowSingleColumn") unless @allow_single_column.nil?
  @contains_custom_datatype = contains_custom_datatype
  Jsii::Type.check_type(@contains_custom_datatype, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "containsCustomDatatype") unless @contains_custom_datatype.nil?
  @contains_header = contains_header
  Jsii::Type.check_type(@contains_header, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containsHeader") unless @contains_header.nil?
  @custom_datatype_configured = custom_datatype_configured
  Jsii::Type.check_type(@custom_datatype_configured, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "customDatatypeConfigured") unless @custom_datatype_configured.nil?
  @delimiter = delimiter
  Jsii::Type.check_type(@delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "delimiter") unless @delimiter.nil?
  @disable_value_trimming = disable_value_trimming
  Jsii::Type.check_type(@disable_value_trimming, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableValueTrimming") unless @disable_value_trimming.nil?
  @header = header
  Jsii::Type.check_type(@header, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "header") unless @header.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @quote_symbol = quote_symbol
  Jsii::Type.check_type(@quote_symbol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "quoteSymbol") unless @quote_symbol.nil?
end

Instance Attribute Details

#allow_single_columnBoolean, ... (readonly)

Enables the processing of files that contain only one column.



576
577
578
# File 'glue/cfn_classifier.rb', line 576

def allow_single_column
  @allow_single_column
end

#contains_custom_datatypeArray<String>? (readonly)

Indicates whether the CSV file contains custom data types.



581
582
583
# File 'glue/cfn_classifier.rb', line 581

def contains_custom_datatype
  @contains_custom_datatype
end

#contains_headerString? (readonly)

Indicates whether the CSV file contains a header.

A value of UNKNOWN specifies that the classifier will detect whether the CSV file contains headings.

A value of PRESENT specifies that the CSV file contains headings.

A value of ABSENT specifies that the CSV file does not contain headings.



592
593
594
# File 'glue/cfn_classifier.rb', line 592

def contains_header
  @contains_header
end

#custom_datatype_configuredBoolean, ... (readonly)

Enables the configuration of custom data types.



597
598
599
# File 'glue/cfn_classifier.rb', line 597

def custom_datatype_configured
  @custom_datatype_configured
end

#delimiterString? (readonly)

A custom symbol to denote what separates each column entry in the row.



602
603
604
# File 'glue/cfn_classifier.rb', line 602

def delimiter
  @delimiter
end

#disable_value_trimmingBoolean, ... (readonly)

Specifies not to trim values before identifying the type of column values.

The default value is true .



609
610
611
# File 'glue/cfn_classifier.rb', line 609

def disable_value_trimming
  @disable_value_trimming
end

#headerArray<String>? (readonly)

A list of strings representing column names.



614
615
616
# File 'glue/cfn_classifier.rb', line 614

def header
  @header
end

#nameString? (readonly)

The name of the classifier.



619
620
621
# File 'glue/cfn_classifier.rb', line 619

def name
  @name
end

#quote_symbolString? (readonly)

A custom symbol to denote what combines content into a single column value.

It must be different from the column delimiter.



626
627
628
# File 'glue/cfn_classifier.rb', line 626

def quote_symbol
  @quote_symbol
end

Class Method Details

.jsii_propertiesObject



628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'glue/cfn_classifier.rb', line 628

def self.jsii_properties
  {
    :allow_single_column => "allowSingleColumn",
    :contains_custom_datatype => "containsCustomDatatype",
    :contains_header => "containsHeader",
    :custom_datatype_configured => "customDatatypeConfigured",
    :delimiter => "delimiter",
    :disable_value_trimming => "disableValueTrimming",
    :header => "header",
    :name => "name",
    :quote_symbol => "quoteSymbol",
  }
end

Instance Method Details

#to_jsiiObject



642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'glue/cfn_classifier.rb', line 642

def to_jsii
  result = {}
  result.merge!({
    "allowSingleColumn" => @allow_single_column,
    "containsCustomDatatype" => @contains_custom_datatype,
    "containsHeader" => @contains_header,
    "customDatatypeConfigured" => @custom_datatype_configured,
    "delimiter" => @delimiter,
    "disableValueTrimming" => @disable_value_trimming,
    "header" => @header,
    "name" => @name,
    "quoteSymbol" => @quote_symbol,
  })
  result.compact
end