Interface CsvOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CsvOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-06T22:15:52.747Z")
@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 ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCsvOptions
static final class
An implementation forCsvOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic CsvOptions.Builder
builder()
default String
The delimiter used for separating items in the CSV file being imported.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
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.
- comma (
-
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
- Returns:
- a
CsvOptions.Builder
ofCsvOptions
-