Class CsvProcessorDescriptor<T>
Extracts fields from CSV line out of a single text field within a document.
Any empty field in CSV will be skipped.
Inheritance
CsvProcessorDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class CsvProcessorDescriptor<T> : ProcessorDescriptorBase<CsvProcessorDescriptor<T>, ICsvProcessor>, IDescriptor, ICsvProcessor, IProcessor where T : class
Type Parameters
Properties
|
Edit this page
View Source
Name
Declaration
protected override string Name { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
EmptyValue(object)
Value used to fill empty fields, empty fields will be skipped if this is not provided.
Empty field is one with no value (2 consecutive separators) or empty quotes ("")
Declaration
public CsvProcessorDescriptor<T> EmptyValue(object value)
Parameters
| Type |
Name |
Description |
| object |
value |
|
Returns
|
Edit this page
View Source
Field(Field)
The field to extract data from
Declaration
public CsvProcessorDescriptor<T> Field(Field field)
Parameters
| Type |
Name |
Description |
| Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
The field to extract data from
Declaration
public CsvProcessorDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
IgnoreMissing(bool?)
If true and Field does not exist or is null,
the processor quietly exits without modifying the document. Default is false
Declaration
public CsvProcessorDescriptor<T> IgnoreMissing(bool? ignoreMissing = true)
Parameters
| Type |
Name |
Description |
| bool? |
ignoreMissing |
|
Returns
|
Edit this page
View Source
Quote(string)
Quote used in CSV, has to be single character string. Defaults to "
Declaration
public CsvProcessorDescriptor<T> Quote(string quote)
Parameters
| Type |
Name |
Description |
| string |
quote |
|
Returns
|
Edit this page
View Source
Separator(string)
Separator used in CSV, has to be single character string. Defaults to ,
Declaration
public CsvProcessorDescriptor<T> Separator(string separator)
Parameters
| Type |
Name |
Description |
| string |
separator |
|
Returns
|
Edit this page
View Source
TargetFields(Fields)
The array of fields to assign extracted values to.
Declaration
public CsvProcessorDescriptor<T> TargetFields(Fields targetFields)
Parameters
| Type |
Name |
Description |
| Fields |
targetFields |
|
Returns
|
Edit this page
View Source
TargetFields(Func<FieldsDescriptor<T>, IPromise<Fields>>)
The array of fields to assign extracted values to.
Declaration
public CsvProcessorDescriptor<T> TargetFields(Func<FieldsDescriptor<T>, IPromise<Fields>> targetFields)
Parameters
Returns
|
Edit this page
View Source
Trim(bool?)
Trim whitespaces in unquoted fields. Default is false;
Declaration
public CsvProcessorDescriptor<T> Trim(bool? trim = true)
Parameters
| Type |
Name |
Description |
| bool? |
trim |
|
Returns
Implements
Extension Methods