Search Results for

    Show / Hide Table of Contents

    Class FlatRowSchema

    Provides information about the columns in an external data source, where only the column names, number, and order are available. This is useful for working with columns, e.g. for implementing column mapping directly, or for building higher level constructs such as FromTypeRowMapper<TFrom> and ToTypeRowMapper<TTo>.

    Use TypeRowSchema instead when you have access to the required .NET CLR type, since it can populate the instance automatically from the type. Otherwise use this class and specify columns explicitly.

    Columns can be searched for via several Get* methods. They can also be accessed as a flat list via the SchemaNodeList property, and as a hierarchical tree via the SchemaNodeRoot property, both of which return items in a well defined order controlled by OrderAttribute. Note that the root node of the tree is not included in the SchemaNodeList list.

    The hierarchical tree and flat list include all descendant fields and properties, down to individual columns, e.g. int, byte[], SqlBinary etc., although for this class the tree only has a single level below the root.

    See Dataflow Columns for details.

    Inheritance
    Object
    RowSchemaBase<FlatRowSchema, SchemaNode>
    FlatRowSchema
    Inherited Members
    RowSchemaBase<FlatRowSchema, SchemaNode>.ColumnCount
    RowSchemaBase<FlatRowSchema, SchemaNode>.GetSchemaNode(String)
    RowSchemaBase<FlatRowSchema, SchemaNode>.GetSchemaNodesBySuffix(String)
    RowSchemaBase<FlatRowSchema, SchemaNode>.GetSchemaNodesBySuffix()
    RowSchemaBase<FlatRowSchema, SchemaNode>.SchemaNodeList
    RowSchemaBase<FlatRowSchema, SchemaNode>.SchemaNodeRoot
    RowSchemaBase<FlatRowSchema, SchemaNode>.ToString()
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public class FlatRowSchema : RowSchemaBase<FlatRowSchema, SchemaNode>

    Methods

    Create(IEnumerable<String>)

    Retrieves or creates a FlatRowSchema instance with the specified column names. One FlatRowSchema instance is cached for each unique ordered set of names. This is useful when modeling a data source without any column hierarchy, but with column names, since column mapping can be done on column name.

    Declaration
    public static FlatRowSchema Create(IEnumerable<string> columnNames)
    Parameters
    Type Name Description
    IEnumerable<String> columnNames

    The column names.

    Returns
    Type Description
    FlatRowSchema

    A FlatRowSchema instance with the specified column names.

    Exceptions
    Type Condition
    ArgumentNullException

    columnNames

    Create(Int32)

    Creates a FlatRowSchema instance with the specified number of columns. The first column will have the name "0", the second "1" etc. This is useful when modeling a data source without any column hierarchy and without any intrinsic column name, since column mapping can be done on column index, or the generated column names.

    Declaration
    public static FlatRowSchema Create(int columnCount)
    Parameters
    Type Name Description
    Int32 columnCount

    The column count.

    Returns
    Type Description
    FlatRowSchema

    A FlatRowSchema instance with the specified number of columns.

    Exceptions
    Type Condition
    ArgumentException

    columnCount - Must be 0 or greater.

    Create(String[])

    Retrieves or creates a FlatRowSchema instance with the specified column names. One FlatRowSchema instance is cached for each unique ordered set of names. This is useful when modeling a data source without any column hierarchy, but with column names, since column mapping can be done on column name.

    Declaration
    public static FlatRowSchema Create(params string[] columnNames)
    Parameters
    Type Name Description
    String[] columnNames

    The column names.

    Returns
    Type Description
    FlatRowSchema

    A FlatRowSchema instance with the specified column names.

    Exceptions
    Type Condition
    ArgumentNullException

    columnNames

    ToString()

    Returns a string that represents this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    actionETL.RowSchemaBase<actionETL.FlatRowSchema, actionETL.SchemaNode>.ToString()

    See Also

    OrderAttribute
    SchemaNode
    TypeRowSchema
    RowSchemaBase<TRowSchema, TSchemaNode>
    FromTypeRowMapper<TFrom>
    FromTypeColumnMapper<TFrom>
    ToTypeRowMapper<TTo>
    ToTypeColumnMapper<TTo>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd