CsvSource<TOutput>
Class CsvSource<TOutput>
Reads data from a csv source. While reading the data from the file, data is also asnychronously posted into the targets. Data is read a as string from the source and dynamically converted into the corresponding data format.
Inheritance
Inherited Members
Namespace: ETLBox.Csv
Assembly: ETLBox.Csv.dll
Syntax
Type Parameters
Name | Description |
---|---|
TOutput | Type of outgoing data |
Examples
CsvSource<CSVData> source = new CsvSource<CSVData>("Demo.csv");
source.Configuration.Delimiter = ";";
Constructors
CsvSource()
Declaration
CsvSource(string)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | uri | The source csv file name or uri |
CsvSource(string, ResourceType)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | uri | The source csv file name or uri |
ResourceType | resourceType | Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage) |
Properties
Configuration
The CsvHelper Configuration. E.g. you can change the delimiter or the escape character here.
Declaration
Property Value
Type | Description |
---|---|
CsvConfiguration |
CsvContext
Gives you access to the CsvHelper CsvContext. You can modify the context before data is read.
Declaration
Property Value
Type | Description |
---|---|
Action<CsvContext> |
FieldHeaders
The parsed header names from the csv
Declaration
Property Value
Type | Description |
---|---|
string[] |
Methods
CheckParameter()
Declaration
Overrides
CloseReader()
Declaration
Overrides
InitReader()
Declaration
Overrides
ReadAllRecords()
Declaration
Overrides
ReadFieldHeaders(string)
Reads the header names using the current configuration.
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | uri | Optionally you can override the current configured Uri |
Returns
Type | Description |
---|---|
string[] | An array with the header names |