image/svg+xml en
  • Articles
  • API Documentation
  • envobi.com
  • blog
  • API Documentation
  • actionETL.FileHelper
  • FileHelperStreamTargetFactory
Search Results for

    Show / Hide Table of Contents
    • actionETL
      • ActionSource<TOutput, TError>
      • ActionSource<TOutput>
      • ActionTarget<TInput, TError>
      • ActionTarget<TInput>
      • ActionTargetFactory
      • ActionTransform<TInputError, TOutput>
      • ActionTransform<TInputOutputError>
      • ActionTransformFactory
      • ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>
      • ActionTwoInputTransformFactory
      • ActionWorker
      • ActionWorkerBase<TDerived>
      • AggregateTransform<TInput, TAccumulate, TOutput>
      • AggregateTransform<TInput, TAccumulateOutput>
      • AggregateTransform<TInputAccumulateOutput>
      • AggregateTransformFactory
      • CaptureRowErrors
      • CollectionTarget<TInput, TCollection>
      • CollectionTarget<TInput>
      • CollectionTargetFactory
      • Comparison<TLeft, TRight>
      • ConvertExpressionInfo
      • CopyFileWorker
      • CreateFileWorker
      • CrossJoinTransform<TLeftInput, TRightInput, TOutput>
      • CrossJoinTransformFactory
      • DebugPortCommands
      • DebugWorkerParentCommands
      • DeepCopyExpressionCallback
      • DeleteFileWorker
      • DictionaryAddKeyTreatment
      • DictionaryLookupRowTreatment
      • DictionaryLookupSplitTransform<TInputOutputError, TDictionaryInput, TKey, TValue>
      • DictionaryLookupSplitTransform<TInputOutputError, TKey, TValue>
      • DictionaryLookupSplitTransformFactory
      • DictionaryLookupTransform<TInputOutputError, TDictionaryInput, TKey, TValue>
      • DictionaryLookupTransform<TInputOutputError, TKey, TValue>
      • DictionaryLookupTransformFactory
      • DictionaryTarget<TInput, TKey, TValue>
      • DictionaryTargetFactory
      • DownstreamFactory<TOutput>
      • EnumerableSource<TOutput>
      • ErrorOutputPort<TError>
      • ErrorOutputPortCollection
      • ExceptionExtensions
      • ExecuteProcessWorker
      • FileExistsWorker
      • FlatRowSchema
      • ForEachActionWorker<TItem>
      • FromTypeColumnMapper<TFrom>
      • FromTypeColumnMappings
      • FromTypeRowMapper<TFrom>
      • FromTypeRowMappings
      • FullJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
      • FullJoinMergeSortedTransformFactory
      • IAggregationCommand
      • IColumnMapperCommand
      • IComparer<TLeft, TRight>
      • IDisposeOnFinished
      • IFluentInterface
      • IGroupByCommand
      • IGroupByCopyCommand
      • InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
      • InnerJoinMergeSortedTransformFactory
      • InputPort
      • InputPort<TInput>
      • InputPortCollection
      • InputPortCollection<TInput>
      • InputPortState
      • InputPortStateExtensions
      • IOutcomeStatus
      • IRowComparerCommand<T>
      • IRowComparerCommand<TLeft, TRight>
      • IRowMapperCommand
      • JoinMergeSortedTransformBase<TDerived, TLeftInput, TRightInput, TOutput>
      • LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
      • LeftJoinMergeSortedTransformFactory
      • MergeSortedTransform<TInputOutput>
      • MergeSortedTransformFactory
      • MoveFileWorker
      • MulticastTransform<TInputOutput>
      • MulticastTransformFactory
      • MutableKeyValue
      • MutableKeyValue<TKey, TValue>
      • OrderAttribute
      • OutcomeState
      • OutcomeStatus
      • OutcomeStatusResult
      • OutcomeStatusResult<TResult>
      • OutputPort<TOutput>
      • OutputPortBase
      • OutputPortBase<TOutput>
      • OutputPortBaseCollection
      • OutputPortBaseState
      • OutputPortBaseStateExtensions
      • OutputPortCollection
      • OutputPortCollection<TOutput>
      • PortBufferingMode
      • PortPassThroughSource<TOutput>
      • PortPassThroughTarget<TInputOutput>
      • PortPassThroughTargetFactory
      • ProgressState
      • ProgressStateExtensions
      • ProgressStatus
      • ProgressStatusResult
      • ProgressStatusResult<TResult>
      • RepeatRowsSource<TOutput>
      • RightJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
      • RightJoinMergeSortedTransformFactory
      • RowActionTarget<TInput>
      • RowActionTargetFactory
      • RowActionTransform<TInputError, TOutput>
      • RowActionTransform<TInputOutputError>
      • RowActionTransformFactory
      • RowAggregationFunction
      • RowComparer<T>
      • RowComparer<TLeft, TRight>
      • RowEqualityComparer
      • RowEqualityComparer<T>
      • RowError
      • RowErrorCollection
      • RowsActionSource<TOutput, TError>
      • RowsActionSource<TOutput>
      • RowsActionTarget<TInput>
      • RowsActionTargetFactory
      • RowsActionTransform<TInputError, TOutput>
      • RowsActionTransform<TInputOutputError>
      • RowsActionTransformFactory
      • RowSchemaBase<TRowSchema, TSchemaNode>
      • RowSchemaMapCounts
      • RowSourceBase<TDerived, TOutput>
      • RowsSourceBase<TDerived, TOutput, TError>
      • RowsSourceBase<TDerived, TOutput>
      • RowsTargetBase<TDerived, TInput, TError>
      • RowsTargetBase<TDerived, TInput>
      • RowsTransformBase<TDerived, TInput, TOutput, TError>
      • RowsTransformBase<TDerived, TInput, TOutput>
      • RowTargetBase<TDerived, TInput>
      • RowTransformBase<TDerived, TInputError, TOutput>
      • RowTransformBase<TDerived, TInputOutputError>
      • RowWithErrorTargetBase<TDerived, TInputError>
      • RuntimeInfo
      • SafeWorkerParentValue<T>
      • SchemaMap
      • SchemaNode
      • SchemaNodeCategory
      • SortTransform<TInputOutput>
      • SortTransformFactory
      • SourceBase<TDerived, TOutput, TError>
      • SourceBase<TDerived, TOutput>
      • SplitTransform<TInputOutputError>
      • SplitTransformFactory
      • StringNumberRow
      • StringRow
      • StringRowErrors
      • SystemOutcomeStatus
      • TargetBase<TDerived, TInput, TError>
      • TargetBase<TDerived, TInput>
      • ToTypeColumnMapper<TTo>
      • ToTypeColumnMappings
      • ToTypeRowMapper<TTo>
      • ToTypeRowMappings
      • TransformAggregation<TInput, TAccumulate>
      • TransformAggregation<TInputAccumulate>
      • TransformAggregationBase<TInput>
      • TransformBase<TDerived, TInput, TOutput>
      • TransformRowTreatment
      • TrashTarget<TInput>
      • TrashTargetFactory
      • TwoInputTransformBase<TDerived, TLeftInput, TRightInput, TOutput>
      • TypeColumnCopier<TFrom, TTo>
      • TypeColumnMapper<TFrom, TTo>
      • TypeColumnMappings
      • TypeDetail
      • TypeExtensions
      • TypeRowMapper<TFrom, TTo>
      • TypeRowMappings
      • TypeRowSchema
      • TypeSchemaCopyOption
      • TypeSchemaCopyPolicy
      • TypeSchemaNode
      • UnionAllTransform<TInputOutput>
      • UnionAllTransformFactory
      • UsingActionWorker<TDisposable>
      • VersionInfo
      • WhileActionWorker<T>
      • Worker
      • WorkerBase
      • WorkerBase<TDerived>
      • WorkerParent
      • WorkerParentChildrenState
      • WorkerParentState
      • WorkerParentStateExtensions
      • WorkerParentStatus
      • WorkerSystem
      • WorkerSystemBase
      • WorkerSystemBase<TDerived>
    • actionETL.Adb
      • AdbColumnSchema
      • AdbCommand
      • AdbCommandBuilder
      • AdbConnection
      • AdbConnectionBuilder
      • AdbConnectionBuilderBase
      • AdbConnectionMode
      • AdbConnectionString
      • AdbDataReaderSource<TOutput>
      • AdbDataSourceInformation
      • AdbExecuteNonQueryTarget<TInputError>
      • AdbExecuteNonQueryTargetFactory
      • AdbExecuteNonQueryWorker
      • AdbExecuteScalarWorker<TResult>
      • AdbGenericDataSourceInformationService
      • AdbGenericTableInformationService
      • AdbInsertTarget<TInputError>
      • AdbInsertTargetFactory
      • AdbKeepOpenConnection
      • AdbKeepOpenConnectionBuilder
      • AdbParameter
      • AdbParameterCollection
      • AdbProvider
      • AdbSchemaInformation
      • AdbSql92InsertStatementService
      • AdbSqlClientInsertStatementService
      • AdbTableCommand
      • AdbTableCommandServiceBase
      • AdbTableIdentifier
      • AdbTableInformation
      • AdbTableNonQueryOperation
      • AdbTableNonQueryWorker
      • AdbTableType
      • AdbTransaction
      • AdbTransactionActionWorker
      • AdbTypeMapper
      • ConnectionStringSettingsCollectionExtensions
      • IAdbConnection
      • IAdbConnectionBuilder
      • IAdbDataSourceInformationService
      • IAdbInsertStatementService
      • IAdbTableCommandService
      • IAdbTableIdentifier
      • IAdbTableInformationService
      • IAdbTransaction
      • IAdbTypeMapper
      • IAdbTypeService
    • actionETL.Adb.MySqlClientExternal
      • AdbMySqlClientDataSourceInformationService
      • AdbMySqlClientProvider
      • AdbMySqlClientTableCommandService
      • AdbMySqlClientTableInformationService
      • AdbMySqlClientTypeMapper
      • AdbMySqlClientTypeService
    • actionETL.Adb.MySqlConnectorExternal
      • AdbMySqlConnectorBulkInsertTarget<TInput>
      • AdbMySqlConnectorBulkInsertTargetFactory
      • AdbMySqlConnectorDataSourceInformationService
      • AdbMySqlConnectorProvider
      • AdbMySqlConnectorTableCommandService
      • AdbMySqlConnectorTableInformationService
      • AdbMySqlConnectorTypeMapper
      • AdbMySqlConnectorTypeService
    • actionETL.Adb.NpgsqlExternal
      • AdbNpgsqlDataSourceInformationService
      • AdbNpgsqlProvider
      • AdbNpgsqlTableCommandService
      • AdbNpgsqlTableInformationService
      • AdbNpgsqlTypeMapper
      • AdbNpgsqlTypeService
    • actionETL.Adb.OdbcExternal
      • AdbOdbcDataSourceInformationService
      • AdbOdbcProvider
      • AdbOdbcTableInformationService
      • AdbOdbcTypeMapper
      • AdbOdbcTypeService
    • actionETL.Adb.SqlClientExternal
      • AdbSqlClientBulkInsertTarget<TInput>
      • AdbSqlClientBulkInsertTargetFactory
      • AdbSqlClientDataSourceInformationService
      • AdbSqlClientProvider
      • AdbSqlClientTableCommandService
      • AdbSqlClientTableInformationService
      • AdbSqlClientTypeMapper
      • AdbSqlClientTypeService
    • actionETL.Adb.SQLiteExternal
      • AdbSQLiteDataSourceInformationService
      • AdbSQLiteProvider
      • AdbSQLiteTableCommandService
      • AdbSQLiteTableInformationService
      • AdbSQLiteTypeMapper
      • AdbSQLiteTypeService
    • actionETL.Configuration
      • AConfig
      • AConfigSetting
      • ConfigurationServiceItem
      • GetValueOutcome
      • GetValueOutcome.NotFound
      • GetValueOutcome.NotSupported
      • GetValueOutcome.ParseError
      • GetValueOutcome.Succeeded
      • IConfigurationService
      • IConfigurationServiceItem
      • IGetValueOutcome
      • JsonConfigurationService
    • actionETL.EPPlus
      • IXlsxSourceCommand
      • IXlsxTargetCommand
      • XlsxSource<TOutput>
      • XlsxTarget<TInput>
      • XlsxTargetFactory
      • XlsxTargetWriteOption
    • actionETL.FileHelper
      • FileHelperFileSource<TOutput>
      • FileHelperFileTarget<TInput>
      • FileHelperFileTargetFactory
      • FileHelperStreamSource<TOutput>
      • FileHelperStreamTarget<TInput>
      • FileHelperStreamTargetFactory
      • FileHelperStringSource<TOutput>
    • actionETL.Logging
      • ALog
      • ALogCategory
      • ALogLevel
      • ALogMessageCallback
      • IALogFactory
      • IALogService
      • NullLogFactory
    • actionETL.Logging.NLogExternal
      • CurrentTaskIdLayoutRenderer
      • NLogDisposableFactory
      • NLogFactory
      • NLogLogService
      • ThrottleTargetWrapper

    Class FileHelperStreamTargetFactory

    Factory methods that create a FileHelperStreamTarget<TInput> dataflow worker, which consumes incoming rows and writes them as delimited (e.g. CSV) or fixed format records to a Stream.

    Please see CSV Delimited and Fixed Format for how to specify the data format. Internally, this worker uses the http://www.filehelpers.net/ library to read the data, specifically the FileHelperAsyncEngine class.

    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>).

    Inheritance
    Object
    FileHelperStreamTargetFactory
    Namespace: actionETL.FileHelper
    Assembly: actionETL.dll
    Syntax
    public static class FileHelperStreamTargetFactory

    Methods

    FileHelperStreamTarget<TInput>(in DownstreamFactory<TInput>, String, TextWriter)

    Initializes a new instance of the FileHelperStreamTarget<TInput> dataflow worker, which consumes incoming rows and writes them as delimited (e.g. CSV) or fixed format records to a Stream.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    [CLSCompliant(false)]
    public static FileHelperStreamTarget<TInput> FileHelperStreamTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, TextWriter textWriter)
        where TInput : class
    Parameters
    Type Name Description
    DownstreamFactory<TInput> 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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    TextWriter textWriter

    The text writer to write the rows to.

    Returns
    Type Description
    FileHelperStreamTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    See Also

    FileHelperStreamTarget<TInput>
    FileHelperFileTargetFactory
    In This Article
    • Methods
      • FileHelperStreamTarget<TInput>(in DownstreamFactory<TInput>, String, TextWriter)
    • See Also
    Back to top Copyright © 2023 Envobi Ltd