Class RowActionTransformFactory
Factory methods that create a
RowActionTransform<TInputOutputError> or
RowActionTransform<TInputError, TOutput>
dataflow worker, which executes a callback on each row passing through the transform.
The callback does not itself take rows from or send rows to the ports.
If the callback throws an exception, the input row will be rejected to the ErrorOutput
port.
The input port uses the Default policy. Consider whether this is appropriate, or should be overridden, see BufferingMode for further details.
Also see the RowActionTransform example.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Get the factory from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>).
Note that this worker does not support asynchronous row methods. If that is needed, consider using RowsActionTransform<TInputOutputError> or RowsTransformBase<TDerived, TInput, TOutput, TError> instead.
To create a transform without any ErrorOutput, consider inheriting from
RowsTransformBase<TDerived, TInput, TOutput>.
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public static class RowActionTransformFactory
Methods
RowActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Action<TInputOutputError>)
Initializes a new instance of the
RowActionTransform<TInputOutputError>
dataflow worker, which executes a synchronous action on each row passing through
the transform.
The callback is passed the row as a parameter, to read and modify as needed before
it's automatically passed to the downstream worker. The callback does not
itself take rows from or send rows to the ports.
This constructor does not allow discarding input rows.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputOutputError> RowActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Action<TInputOutputError> rowAction)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Action<TInputOutputError> | rowAction | The synchronous action that will get called to read and optionally modify
each incoming row. It receives the row as a parameter, which is guaranteed to
not be |
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<TInputOutputError, TransformRowTreatment>)
Initializes a new instance of the
RowActionTransform<TInputOutputError>
dataflow worker, which executes a synchronous function on each row passing through
the transform.
The callback is passed the row as a parameter, to read and modify as needed before
it's automatically passed to the downstream worker. The callback does not
itself take rows from or send rows to the ports.
This constructor does allow discarding input rows.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputOutputError> RowActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<TInputOutputError, TransformRowTreatment> rowFunc)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<TInputOutputError, TransformRowTreatment> | rowFunc | The synchronous function that will get called to read and optionally modify each incoming row.
It receives the row as a parameter, which is guaranteed to not be |
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowActionTransform<TInputOutputError>, Task<ProgressStatus>>, Action<TInputOutputError>, Func<RowActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowActionTransform<TInputOutputError> dataflow worker, which executes a synchronous action on each row passing through the transform. The callback is passed the row as a parameter, to read and modify as needed before it's automatically passed to the downstream worker. The callback does not itself take rows from or send rows to the ports. This constructor does not allow discarding input rows.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputOutputError> RowActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowActionTransform<TInputOutputError>, Task<ProgressStatus>> startingFuncAsync, Action<TInputOutputError> rowAction, Func<RowActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<RowActionTransform<TInputOutputError>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Action<TInputOutputError> | rowAction | The synchronous action that will get called to read and optionally modify
each incoming row. It receives the row as a parameter, which is guaranteed to
not be |
| Func<RowActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in,
after (if needed) completing the Output port according to the
OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowActionTransform<TInputOutputError>, Task<ProgressStatus>>, Func<TInputOutputError, TransformRowTreatment>, Func<RowActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowActionTransform<TInputOutputError> dataflow worker, which executes a synchronous function on each row passing through the transform. The callback is passed the row as a parameter, to read and modify as needed before it's automatically passed to the downstream worker. The callback does not itself take rows from or send rows to the ports. This constructor does allow discarding input rows.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputOutputError> RowActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowActionTransform<TInputOutputError>, Task<ProgressStatus>> startingFuncAsync, Func<TInputOutputError, TransformRowTreatment> rowFunc, Func<RowActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<RowActionTransform<TInputOutputError>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<TInputOutputError, TransformRowTreatment> | rowFunc | The synchronous function that will get called to read and optionally modify each incoming row.
It receives the row as a parameter, which is guaranteed to not be |
| Func<RowActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in,
after (if needed) completing the Output port according to the
OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<TInputError, TOutput>)
Initializes a new instance of the
RowActionTransform<TInputError, TOutput>
dataflow worker, which executes a synchronous function on each row passing through
the transform.
The callback is passed the row as a parameter, and the return value controls whether
to send zero or one row (which can be of a different type) to the output, or to the
error output. When outputting a row, the callback is responsible for either
allocating a new output row, or if appropriate cast the input row to
the output type, before passing it to the downstream worker.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputError, TOutput> RowActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<TInputError, TOutput> rowFunc)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<TInputError, TOutput> | rowFunc | The synchronous function that will get called for each incoming row.
It receives the input row as a parameter, which is guaranteed to not be |
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<TInputError, (TransformRowTreatment, TOutput)>)
Initializes a new instance of the RowActionTransform<TInputError, TOutput> dataflow worker, which executes a synchronous function on each row passing through the transform. The callback is passed the row as a parameter, and the return value controls whether to send zero or one row (which can be of a different type) to the output, or to the error output. When outputting a row, the callback is responsible for either allocating a new output row, or if appropriate cast the input row to the output type, before passing it to the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputError, TOutput> RowActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<TInputError, (TransformRowTreatment, TOutput)> rowTupleFunc)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<TInputError, (T1, T2)<TransformRowTreatment, TOutput>> | rowTupleFunc | The synchronous function that will get called for each incoming row.
It receives the input row as a parameter, which is guaranteed to not be |
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowActionTransform<TInputError, TOutput>, Task<ProgressStatus>>, Func<TInputError, TOutput>, Func<RowActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowActionTransform<TInputError, TOutput> dataflow worker, which executes a synchronous function on each row passing through the transform. The callback is passed the row as a parameter, and the return value controls whether to send zero or one row (which can be of a different type) to the output, or to the error output. When outputting a row, the callback is responsible for either allocating a new output row, or if appropriate cast the input row to the output type, before passing it to the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputError, TOutput> RowActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowActionTransform<TInputError, TOutput>, Task<ProgressStatus>> startingFuncAsync, Func<TInputError, TOutput> rowFunc, Func<RowActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<RowActionTransform<TInputError, TOutput>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<TInputError, TOutput> | rowFunc | The synchronous function that will get called for each incoming row.
It receives the input row as a parameter, which is guaranteed to not be |
| Func<RowActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in,
after (if needed) completing the Output port according to the
OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowActionTransform<TInputError, TOutput>, Task<ProgressStatus>>, Func<TInputError, (TransformRowTreatment, TOutput)>, Func<RowActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowActionTransform<TInputError, TOutput> dataflow worker, which executes a synchronous function on each row passing through the transform. The callback is passed the row as a parameter, and the return value controls whether to send zero or one row (which can be of a different type) to the output, or to the error output. When outputting a row, the callback is responsible for either allocating a new output row, or if appropriate cast the input row to the output type, before passing it to the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTransform<TInputError, TOutput> RowActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowActionTransform<TInputError, TOutput>, Task<ProgressStatus>> startingFuncAsync, Func<TInputError, (TransformRowTreatment, TOutput)> rowTupleFunc, Func<RowActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
| String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
| Func<RowActionTransform<TInputError, TOutput>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<TInputError, (T1, T2)<TransformRowTreatment, TOutput>> | rowTupleFunc | The synchronous function that will get called for each incoming row.
It receives the input row as a parameter, which is guaranteed to not be |
| Func<RowActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in,
after (if needed) completing the Output port according to the
OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|