Class DataFlowStreamDestination<TInput>
The base implementation for a destination that allows writing of data in a stream.
Inheritance
System.Object
DataFlowStreamDestination<TInput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax#
public abstract class DataFlowStreamDestination<TInput> : DataFlowDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowStreamDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, IDataFlowStreamDestination
Type Parameters
Name | Description |
---|
TInput | Type of ingoing data |
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 BlobkBlobClient with provided ConnectionString and ContainerName, the Uri is then the name of the blob
Declaration
public AzureBlobStorageConfiguration AzureBlobStorage { get; set; }
Property Value
CreateStreamWriter#
By default, stream are created internally based on Uri & ResourceType.
If you already have an existing stream, use this function to returns a new StreamWriter based on this stream.
Declaration
public Func<string, StreamWriter> CreateStreamWriter { get; set; }
Property Value
Type | Description |
---|
System.Func<System.String, System.IO.StreamWriter> | |
Encoding#
Encoding used to write data into the source file or web request.
Declaration
public Encoding Encoding { get; set; }
Property Value
Type | Description |
---|
System.Text.Encoding | |
GetNextUri#
This function returns the next url that is used for writing data. It will used until HasNextUri returns false.
The incoming StreamMetaData holds information about the current progress and currently processed data row.
This property can be used if you want to write into multiple files or send data into different web services.
Declaration
public Func<StreamMetaData, TInput, string> GetNextUri { get; set; }
Property Value
HasNextUri#
This func determines if the next data record should be written into another location.
StreamMetaData has information about the current progress and currently processed data row.
Declaration
public Func<StreamMetaData, TInput, bool> HasNextUri { get; set; }
Property Value
HttpClient#
The System.Net.HttpClient used to connect with the destination (only needed when the ResourceType is Http.
Declaration
public HttpClient HttpClient { get; set; }
Property Value
Type | Description |
---|
System.Net.Http.HttpClient | |
HttpContentType#
The content type used when sending the http request content.
Declaration
public virtual string HttpContentType { get; set; }
Property Value
Type | Description |
---|
System.String | |
HttpRequestMessage#
The System.Net.Http.HttpRequestMessage use for the request from the HttpClient. You can use the
to add additional meta data or to change the request type (default is POST).
Declaration
public HttpRequestMessage HttpRequestMessage { get; set; }
Property Value
Type | Description |
---|
System.Net.Http.HttpRequestMessage | |
ResourceType#
Specifies the resource type.
Use ResourceType.File if you want to write into a file (default)
Use ResourceType.Http to write into a web endpoint.
Declaration
public ResourceType ResourceType { get; set; }
Property Value
StreamWriter#
The stream writer used for the current request.
Declaration
public StreamWriter StreamWriter { get; protected set; }
Property Value
Type | Description |
---|
System.IO.StreamWriter | |
Uri#
Declaration
public string Uri { get; set; }
Property Value
Type | Description |
---|
System.String | |
WriteUri#
The Uri used for the current write operation- this will only be different to the Uri
if you use the GetNextUri and HasNextUri functions.
Declaration
public string WriteUri { get; protected set; }
Property Value
Type | Description |
---|
System.String | |
Methods
CheckParameter()#
Declaration
protected override void CheckParameter()
Overrides
CleanUpOnFaulted(Exception)#
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|
System.Exception | e | |
Overrides
CleanUpOnSuccess()#
Declaration
protected override void CleanUpOnSuccess()
Overrides
CloseStream()#
Declaration
protected abstract void CloseStream()
InitComponent()#
Declaration
protected override void InitComponent()
Overrides
ETLBox.DataFlow.DataFlowDestination<TInput>.InitComponent()
InitStream()#
Declaration
protected abstract void InitStream()
PrepareParameter()#
Declaration
protected override void PrepareParameter()
Overrides
PrepareStreamForBatchProcessing(TInput[])#
Declaration
protected void PrepareStreamForBatchProcessing(TInput[] data)
Parameters
Type | Name | Description |
---|
TInput[] | data | |
WriteData(TInput)#
Declaration
protected void WriteData(TInput data)
Parameters
Type | Name | Description |
---|
TInput | data | |
WriteIntoStream(TInput)#
Declaration
protected abstract void WriteIntoStream(TInput data)
Parameters
Type | Name | Description |
---|
TInput | data | |
Implements#