Class DbDestination<TInput>

A DbDestination represents a database table where ingoing data from the flow is written into. Inserts are done in batches (using Bulk insert or an equivalent INSERT statement).

Inheritance
System.Object
DbDestination<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.Connectors
Assembly: ETLBox.dll
Syntax
    public class DbDestination<TInput> : DataFlowBatchDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowBatchDestination<TInput>, IDataFlowBatchDestination, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
NameDescription
TInput

Data type for ingoing data, preferably representing the data type for the destination table.

Constructors

DbDestination()

Declaration
    public DbDestination()

DbDestination(IConnectionManager, String)

Declaration
    public DbDestination(IConnectionManager connectionManager, string tableName)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

Sets the ConnectionManager

System.StringtableName

Sets the TableName

DbDestination(IConnectionManager, String, Int32)

Declaration
    public DbDestination(IConnectionManager connectionManager, string tableName, int batchSize)
Parameters
TypeNameDescription
IConnectionManagerconnectionManager

Sets the ConnectionManager

System.StringtableName

Sets the TableName

System.Int32batchSize

Sets the BatchSize

DbDestination(String)

Declaration
    public DbDestination(string tableName)
Parameters
TypeNameDescription
System.StringtableName

Sets the TableName

DbDestination(String, Int32)

Declaration
    public DbDestination(string tableName, int batchSize)
Parameters
TypeNameDescription
System.StringtableName

Sets the TableName

System.Int32batchSize

Sets the BatchSize

Fields

DEFAULT_BATCH_SIZE_ODBC_OLEDB

The default batch sized used for ODBC or OleDb connections. Only use if BatchSize is not set manually.

Declaration
    public const int DEFAULT_BATCH_SIZE_ODBC_OLEDB = 100
Field Value
TypeDescription
System.Int32

Properties

BulkInsertConnectionManager

The connection manager used for the bulk inserts. This is a copy of the provided connection manager.

Declaration
    public IConnectionManager BulkInsertConnectionManager { get; protected set; }
Property Value
TypeDescription
IConnectionManager

ColumnConverters

Use a column converter to apply a conversion function to each value of a column.

Declaration
    public ICollection<ColumnConverter> ColumnConverters { get; set; }
Property Value
TypeDescription
System.Collections.Generic.ICollection<ColumnConverter>

ColumnMapping

Column mapping to map property to column names. E.g. if the value of property "Id" should be written into the database column "Key", then you can simply add a column mapping: DbColumnName: "Id" -> PropertyName: "Key".

Declaration
    public ICollection<ColumnMap> ColumnMapping { get; set; }
Property Value
TypeDescription
System.Collections.Generic.ICollection<ColumnMap>

ConnectionManager

The connection manager used to connect to the database - use the right connection manager for your database type.

Declaration
    public virtual IConnectionManager ConnectionManager { get; set; }
Property Value
TypeDescription
IConnectionManager

DestinationTableDefinition

The table definition of the destination table. By default, the table definition is read from the database. Provide a table definition if the definition of the target can't be read automatically or you want the DbDestination only to use the columns in the provided definition.

Declaration
    public TableDefinition DestinationTableDefinition { get; set; }
Property Value
TypeDescription
TableDefinition

KeepIdentity

By default, identity columns (a.k.a auto increment or serial columns) are ignored when writing into the destination. If set to true, the DbDestination will try to overwrite identity values (if there is a corresponding property with a new id value in the data object)

Declaration
    public bool KeepIdentity { get; set; }
Property Value
TypeDescription
System.Boolean

TableName

Name of the database table that receives the data from the data flow.

Declaration
    public string TableName { get; set; }
Property Value
TypeDescription
System.String

TaskName

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
TypeDescription
System.String
Overrides

Methods

BulkInsertData(TInput[])

Declaration
    protected override void BulkInsertData(TInput[] data)
Parameters
TypeNameDescription
TInput[]data
Overrides
ETLBox.DataFlow.DataFlowBatchDestination<TInput>.BulkInsertData(TInput[])

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

FinishWrite()

Declaration
    protected override void FinishWrite()
Overrides
ETLBox.DataFlow.DataFlowBatchDestination<TInput>.FinishWrite()

PrepareParameter()

Declaration
    protected override void PrepareParameter()
Overrides

PrepareWrite()

Declaration
    protected override void PrepareWrite()
Overrides
ETLBox.DataFlow.DataFlowBatchDestination<TInput>.PrepareWrite()

Implements