Class DataFlowStreamSource<TOutput>

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public abstract class DataFlowStreamSource<TOutput> : DataFlowExecutableSource<TOutput>, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput

Properties

AzureBlobStorage

Use this to pass your AzureBlobStorage connection information. There are different methods to connect with Azure Blob Storage: Option 1: provide an existing BlockBlobClient Option 2: create BlockBlobClient based on the Uri and optional credential tokens - the Uri needs to be the blob url Option 3: create BlockBlobClient with provided ConnectionString and ContainerName, the Uri is then the name of the blob

Declaration
    public AzureBlobStorageConfiguration AzureBlobStorage { get; set; }
Property Value
TypeDescription
AzureBlobStorageConfiguration

CollectUnparsedData

Indicates if data not parsed should be stored in the UnparsedData property (also accessable via the current StreamMetaData object when using the GetNextUri/HasNextUri pattern).

Declaration
    public virtual bool CollectUnparsedData { get; set; }
Property Value
TypeDescription
bool

CreateStreamReader

By default, stream are created internally based on Uri & ResourceType. If you already have an existing stream, use this function to returns a StreamReader based on this stream. You can create a stream reader for each requested URI.

Declaration
    public Func<string, StreamReader> CreateStreamReader { get; set; }
Property Value
TypeDescription
Func<string, StreamReader>

Encoding

Encoding used to read data from the source file or web request.

Declaration
    public Encoding Encoding { get; set; }
Property Value
TypeDescription
Encoding

GetNextUri

This function returns the next url that is used for reading data. It will be called until HasNextUri returns false. The incoming StreamMetaData holds information about the current progress and other meta data from the response, like unparsed json data that contains references to the next page of the response. This property can be used if you want to read multiple files or if you want to paginate through web responses.

Declaration
    public Func<StreamMetaData, string> GetNextUri { get; set; }
Property Value
TypeDescription
Func<StreamMetaData, string>

HasNextUri

This func determines if another request is started to read additional data from the next uri. StreamMetaData has information about the current progress and other meta data from the response.

Declaration
    public Func<StreamMetaData, bool> HasNextUri { get; set; }
Property Value
TypeDescription
Func<StreamMetaData, bool>

HttpClient

The System.Net.Http.HttpClient uses for the request. Use this client if you want to add or change the http request data, e.g. you can add your authorization information here.

Declaration
    public HttpClient HttpClient { get; set; }
Property Value
TypeDescription
HttpClient

HttpRequestMessage

The System.Net.Http.HttpRequestMessage used for the request in the HttpClient. Use this property to add additional header data type or to change the http method (e.g. for POST requests).

Declaration
    public HttpRequestMessage HttpRequestMessage { get; set; }
Property Value
TypeDescription
HttpRequestMessage

HttpResponseMessage

The System.Net.HttpResponseMessage returned from the current request.

Declaration
    public HttpResponseMessage HttpResponseMessage { get; }
Property Value
TypeDescription
HttpResponseMessage

NewMetaDataObject

Declaration
    protected StreamMetaData NewMetaDataObject { get; }
Property Value
TypeDescription
StreamMetaData

RequestUri

The Uri used for the current request - this will only be different to the Uri if you use the GetNextUri and HasNextUri functions.

Declaration
    public string RequestUri { get; protected set; }
Property Value
TypeDescription
string

ResourceType

Specifies the resource type. By default requests are made with HttpClient. Specify ResourceType.File if you want to read from a json file.

Declaration
    public ResourceType ResourceType { get; set; }
Property Value
TypeDescription
ResourceType

RowModificationAction

Allows you to modify a record directly after it is read from the source and before it is send to the next component. While processing of data in other components can happen asynchronously, the execution of this action is synchronous and always occurs after each record was read and before a new record is read.

Declaration
    public Action<TOutput, StreamMetaData> RowModificationAction { get; set; }
Property Value
TypeDescription
Action<TOutput, StreamMetaData>

SkipRows

Number of rows to skip before starting reading the header and csv data

Declaration
    public int SkipRows { get; set; }
Property Value
TypeDescription
int

StreamReader

The stream reader used for the current request.

Declaration
    public StreamReader StreamReader { get; protected set; }
Property Value
TypeDescription
StreamReader

UnparsedData

Contains all data from the stream that couldn't be processed.

Declaration
    public string UnparsedData { get; }
Property Value
TypeDescription
string

UnparsedDataBuilder

Declaration
    protected StringBuilder UnparsedDataBuilder { get; set; }
Property Value
TypeDescription
StringBuilder

Uri

The Url of the webservice (e.g. https://test.com/foo) or the file name (relative or absolute).

Declaration
    public string Uri { get; set; }
Property Value
TypeDescription
string

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
Exceptione
Overrides

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

CloseReader()

Declaration
    protected abstract void CloseReader()

InitReader()

Declaration
    protected abstract void InitReader()

OnExecutionDoAsyncWork()

Declaration
    protected override void OnExecutionDoAsyncWork()
Overrides

PrepareParameterForCheck()

Declaration
    protected override void PrepareParameterForCheck()
Overrides

ReadAllRecords()

Declaration
    protected abstract void ReadAllRecords()

Implements