Interface CsvOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CsvOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:09.272Z") @Stability(Stable) public interface CsvOptions extends software.amazon.jsii.JsiiSerializable
The options for imported source files in CSV format.

Example:

 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.s3.*;
 IBucket bucket;
 App app = new App();
 Stack stack = new Stack(app, "Stack");
 Table.Builder.create(stack, "Table")
         .partitionKey(Attribute.builder()
                 .name("id")
                 .type(AttributeType.STRING)
                 .build())
         .importSource(ImportSourceSpecification.builder()
                 .compressionType(InputCompressionType.GZIP)
                 .inputFormat(InputFormat.csv(CsvOptions.builder()
                         .delimiter(",")
                         .headerList(List.of("id", "name"))
                         .build()))
                 .bucket(bucket)
                 .keyPrefix("prefix")
                 .build())
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for CsvOptions
    static final class 
    An implementation for CsvOptions
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default String
    The delimiter used for separating items in the CSV file being imported.
    default List<String>
    List of the headers used to specify a common header for all source CSV files being imported.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getDelimiter

      @Stability(Stable) @Nullable default String getDelimiter()
      The delimiter used for separating items in the CSV file being imported.

      Valid delimiters are as follows:

      • comma (,)
      • tab (\t)
      • colon (:)
      • semicolon (;)
      • pipe (|)
      • space ( )

      Default: - use comma as a delimiter.

    • getHeaderList

      @Stability(Stable) @Nullable default List<String> getHeaderList()
      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 the first line of each CSV file is treated as the header.

      Default: - the first line of the CSV file is treated as the header

    • builder

      @Stability(Stable) static CsvOptions.Builder builder()
      Returns:
      a CsvOptions.Builder of CsvOptions