Search Results for

    Show / Hide Table of Contents

    Target Workers

    A target worker has at least one input port, but no data output ports. It consumes the input data rows, and typically loads them to an external target, such as a database, a file, a .NET collection etc.

    Note
    • The library user instantiates targets via factory methods, see Worker Instantiation for details
    • The type parameters describe what ports the transform has, e.g. *Error* means it has an error output port

    Also see Source Workers and Transform Workers, as well as Non-Dataflow Workers.

    ActionTarget

    Execute an Action or Func callback once, which consumes rows from the upstream worker.

    • Factory: ActionTargetFactory
    • Workers:
      • ActionTarget<TInput>
      • ActionTarget<TInput, TError>
    • Example: Custom Dataflow Target

    AdbExecuteNonQueryTarget

    Execute an SQL query for each incoming row.

    • Factory: AdbExecuteNonQueryTargetFactory
    • Worker: AdbExecuteNonQueryTarget<TInputError>

    AdbInsertTarget

    Inserts incoming rows into an SQL table or view.

    • Factory: AdbInsertTargetFactory
    • Worker: AdbInsertTarget<TInputError>
    • Examples:
      • Read CSV, insert in table
      • Column mapping example 1 and example 2
      • Batch Insert details
      • Process Incoming Files Example
      • AggregateCsvCreateInsertTable Sample

    AdbMySqlConnectorBulkInsertTarget

    High performance bulk insert of incoming records into a MySQL compatible (i.e. including MariaDB) table or view using MySqlConnector.MySqlBulkCopy.

    • Factory: AdbMySqlConnectorBulkInsertTargetFactory
    • Worker: AdbMySqlConnectorBulkInsertTarget<TInput>
    • Examples:
      • See the similar AdbInsertTarget in SQL Database Access and column mapping examples
      • See the similar AdbSqlClientBulkInsertTarget in Slowly Changing Dimension Example

    AdbSqlClientBulkInsertTarget

    High performance bulk insert of incoming records into a SQL Server table or non-partitioned view using SqlBulkCopy.

    • Factory: AdbSqlClientBulkInsertTargetFactory
    • Worker: AdbSqlClientBulkInsertTarget<TInput>
    • Examples:
      • See the similar AdbInsertTarget in SQL Database Access and column mapping examples
      • Slowly Changing Dimension Example

    CollectionTarget

    Consume incoming rows from the upstream worker and add them to an ICollection<T>.

    • Factory: CollectionTargetFactory
    • Workers:
      • CollectionTarget<TInput>
      • CollectionTarget<TInput, TCollection>
    • Examples:
      • Dataflow
      • Debugging
      • Dataflow Aggregations

    DictionaryTarget

    Consume incoming rows from the upstream worker and add them to an IDictionary<TKey,TValue> by selecting a key and value pair for each row.

    • Factory: DictionaryTargetFactory
    • Worker: DictionaryTarget<TInput, TKey, TValue>
    • Example: Used in the same way as this AdbInsertTarget example, except it uses key and value pairs (instead of whole rows), see the selectKeyValueFunc parameter in DictionaryTargetFactory.

    FileHelperFileTarget, FileHelperStreamTarget

    Write incoming rows as delimited (e.g. CSV) or fixed format data to a file, or to a Stream. Also see CSV Delimited and Fixed Format.

    • Factories:
      • FileHelperFileTargetFactory
      • FileHelperStreamTargetFactory
    • Workers:
      • FileHelperFileTarget<TInput>
      • FileHelperStreamTarget<TInput>
    • Examples:
      • Data Formats
      • Dataflow

    PortPassThroughTarget

    Pass rows from a child worker input port to a parent worker output port. Used when encapsulating dataflow workers inside parent dataflow workers.

    • Factory: PortPassThroughTargetFactory
    • Worker: PortPassThroughTarget<TInputOutput>
    • Example: Custom Dataflow Pass-through Workers

    RowActionTarget

    Execute an Action or Func callback for each input row.

    • Factory: RowActionTargetFactory
    • Worker: RowActionTarget<TInput>
    • Example: Custom Dataflow Target

    RowsActionTarget

    Execute an Action or Func callback when there are rows to consume from the upstream worker.

    • Factory: RowsActionTargetFactory
    • Worker: RowsActionTarget<TInput>
    • Examples:
      • Custom Dataflow Target
      • Data Formats

    RowsTargetBase

    Execute a virtual method when there are input rows available. Must be inherited.

    • Workers:
      • RowsTargetBase<TDerived, TInput>
      • RowsTargetBase<TDerived, TInput, TError>
    • Example: Custom Dataflow Target

    RowTargetBase, RowWithErrorTargetBase

    Execute a virtual method for each input row, with or without an ErrorOutput port. Must be inherited.

    • Workers:
      • RowTargetBase<TDerived, TInput>
      • RowWithErrorTargetBase<TDerived, TInputError>
    • Example: Custom Dataflow Target

    TargetBase

    A worker with one input for deriving dataflow targets. Must be inherited.

    • Workers:
      • TargetBase<TDerived, TInput>
      • TargetBase<TDerived, TInput, TError>
    • Examples:
      • Custom Dataflow Target
      • Custom Dataflow Target

    TrashTarget

    Consume and discard all incoming rows.

    • Factory: TrashTargetFactory
    • Worker: TrashTarget<TInput>
    • Examples: Configuration example 1 and example 2

    XlsxTarget

    Writes incoming rows to an XLSX spreadsheet file. Does not require any driver installation. Also see XLSX (Excel) Spreadsheets.

    • Factory: XlsxTargetFactory
    • Worker: XlsxTarget<TInput>
    • Examples:
      • XLSX (Excel) Spreadsheets
      • ReadSortWriteXlsx Sample

    See Also

    • Workers
    • Dataflow
      • Non-Dataflow Workers
      • Source Workers
      • Transform Workers
    • Data Formats
      • CSV Delimited and Fixed Format
      • XLSX (Excel) Spreadsheets
    In This Article
    Back to top Copyright © 2023 Envobi Ltd