Show / Hide Table of Contents

Class CsvOptions

The options for imported source files in CSV format.

Inheritance
object
CsvOptions
Implements
ICsvOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CsvOptions : ICsvOptions
Syntax (vb)
Public Class CsvOptions Implements ICsvOptions
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK;
            using Amazon.CDK.AWS.S3;

            IBucket bucket;


            var app = new App();
            var stack = new Stack(app, "Stack");

            new Table(stack, "Table", new TableProps {
                PartitionKey = new Attribute {
                    Name = "id",
                    Type = AttributeType.STRING
                },
                ImportSource = new ImportSourceSpecification {
                    CompressionType = InputCompressionType.GZIP,
                    InputFormat = InputFormat.Csv(new CsvOptions {
                        Delimiter = ",",
                        HeaderList = new [] { "id", "name" }
                    }),
                    Bucket = bucket,
                    KeyPrefix = "prefix"
                }
            });

Synopsis

Constructors

CsvOptions()

The options for imported source files in CSV format.

Properties

Delimiter

The delimiter used for separating items in the CSV file being imported.

HeaderList

List of the headers used to specify a common header for all source CSV files being imported.

Constructors

CsvOptions()

The options for imported source files in CSV format.

public CsvOptions()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK;
            using Amazon.CDK.AWS.S3;

            IBucket bucket;


            var app = new App();
            var stack = new Stack(app, "Stack");

            new Table(stack, "Table", new TableProps {
                PartitionKey = new Attribute {
                    Name = "id",
                    Type = AttributeType.STRING
                },
                ImportSource = new ImportSourceSpecification {
                    CompressionType = InputCompressionType.GZIP,
                    InputFormat = InputFormat.Csv(new CsvOptions {
                        Delimiter = ",",
                        HeaderList = new [] { "id", "name" }
                    }),
                    Bucket = bucket,
                    KeyPrefix = "prefix"
                }
            });

Properties

Delimiter

The delimiter used for separating items in the CSV file being imported.

public string? Delimiter { get; set; }
Property Value

string

Remarks

Valid delimiters are as follows:

    Default: - use comma as a delimiter.

    HeaderList

    List of the headers used to specify a common header for all source CSV files being imported.

    public string[]? HeaderList { get; set; }
    Property Value

    string[]

    Remarks

    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.

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

    Implements

    ICsvOptions
    Back to top Generated by DocFX