Table of Contents

Class CsvConnectorConfiguration

Namespace
Datafication.Connectors.CsvConnector
Assembly
Datafication.CsvConnector.dll

Represents a configuration class for the CSV connector.

public class CsvConnectorConfiguration : IDataConnectorConfiguration
Inheritance
object
CsvConnectorConfiguration
Implements

Remarks

The configuration provides the necessary properties required for reading data from a CSV source.

Constructors

CsvConnectorConfiguration()

public CsvConnectorConfiguration()

Properties

ErrorHandler

Gets or sets the error handler for managing exceptions.

public Action<Exception>? ErrorHandler { get; set; }

Property Value

Action<Exception>

Remarks

This provides a means to globally handle exceptions that may occur during CSV data processing without having to handle them individually on each call. If the handler is not set, exceptions will propagate as usual.

HeaderRow

Gets or sets a value indicating whether the CSV data includes a header row.

public bool HeaderRow { get; set; }

Property Value

bool

Remarks

When set to true, the first row of the CSV will be treated as column headers. When set to false, the data will be read starting from the first row.

Id

Gets or sets the unique identifier for this configuration.

public string Id { get; set; }

Property Value

string

Remarks

This identifier can be useful for distinguishing between multiple connector configurations, if needed.

Separator

Gets or sets the separator character used in the CSV.

public char? Separator { get; set; }

Property Value

char?

Remarks

This character is used to separate fields in the CSV data. Common separators include commas (,), semicolons (;), and tabs (\t). If not set, a default separator (like a comma) might be assumed.

Source

Gets or sets the source URI for the CSV data.

public Uri Source { get; set; }

Property Value

Uri

Remarks

This represents the location of the CSV data source. It can be a file path (file://), a URL (http://, https://), or a relative path that will be resolved against the application's base directory.