Class ColumnRename<TInput>
ColumnRename allows you to rename the column or properties names of your ingoing data.
This transformation works with objects, ExpandoObjects and arrays as input data type.
ColumnRename will always convert the input type into a (dynamic) ExpandoObject.
Provide a column mapping with the old and the new name. The mapping can also be automatically retrieved from
existing ColumnMap attributes. For arrays provide the array index and the new name.
Inheritance
object
ColumnRename<TInput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.DataFlow.Transformations
Assembly: ETLBox.dll
public class ColumnRename<TInput> : DataFlowTransformation<TInput, ExpandoObject>, ILoggableTask, IDataFlowLogging, IDataFlowTransformation<TInput, ExpandoObject>, IDataFlowSource<ExpandoObject>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|
TInput | Type of ingoing data |
Constructors
Declaration
Declaration
public ColumnRename(ICollection<RenameColumn> renameColumns)
Parameters
Type | Name | Description |
---|
System.Collections.Generic.ICollection<T><RenameColumn> | renameColumns | |
Properties
Declaration
public int ProgressCount { get; }
Property Value
The column mapping defines how existing properties or columns are renamed.
For objects and dynamic object provide a mapping with the old and the new name (arrays: array index and new name).
The mapping can also be automatically retrieved from RenameColumn attributes on the properties in strongly typed objects.
Declaration
public ICollection<RenameColumn> RenameColumns { get; set; }
Property Value
Type | Description |
---|
System.Collections.Generic.ICollection<T><RenameColumn> | |
Instead (or additional) to existing column renaming provided via the RenameColumns property or
the RenameColumn attribute, you can define your own renaming function.
It is called for each column in each row from the input, and allows you to transform the column/property name into
a different property name.
Declaration
public Func<string, string> RenameFunc { get; set; }
Property Value
Type | Description |
---|
System.Func<T, TResult><string, string> | |
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
public override ISourceBlock<ExpandoObject> SourceBlock { get; }
Property Value
Type | Description |
---|
System.Threading.Tasks.Dataflow.ISourceBlock<TOutput><ExpandoObject> | |
Overrides
ETLBox.DataFlow.DataFlowSource<System.Dynamic.ExpandoObject>.SourceBlock
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration
public override ITargetBlock<TInput> TargetBlock { get; }
Property Value
Type | Description |
---|
System.Threading.Tasks.Dataflow.ITargetBlock<TInput><TInput> | |
Overrides
ETLBox.DataFlow.DataFlowTransformation<TInput, System.Dynamic.ExpandoObject>.TargetBlock
A name to identify the task or component. Every component or task comes
with a default name that can be overwritten.
Declaration
public override string TaskName { get; set; }
Property Value
Overrides
Methods
Declaration
protected override void CheckParameter()
Overrides
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|
System.Exception | e | |
Overrides
Declaration
protected override void CleanUpOnSuccess()
Overrides
Declaration
protected override void InitComponent()
Overrides
Declaration
public override IDataFlowSource<ETLBoxError> LinkErrorTo(IDataFlowDestination<ETLBoxError> target)
Parameters
Returns
Overrides
ETLBox.DataFlow.DataFlowSource<System.Dynamic.ExpandoObject>.LinkErrorTo(ETLBox.DataFlow.IDataFlowDestination<ETLBox.DataFlow.ETLBoxError>)
Declaration
protected override void PrepareParameter()
Overrides
Implements