We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

read a delimited file with a mix of columns populated

Comments

3 comments

  • Avatar
    Adrian Williams

    Hi Martin,

    You can configure the CSV/Delimited node to assume each record in the file is a single field (e.g. named 'Data'). You can specify the name for the dummy field in the 'FieldNames' property.

    The node would be configured with a Delimiter character that will not exist in the actual file data e.g. '¬' or a control character '\07'.

    If the file data has a header record this can be skipped by setting the 'SkipHeaderRows' property to a value of '1'.

    Once the data has been imported you can then split the data on the leading characters of the 'Data' field and then use further CSV/Delimited nodes that are configured to source their (pipe-delimited) data from an input field.

    You may also be interested in this article:

    https://support.infogix.com/hc/en-us/community/posts/360028941493-Expanding-a-List-into-Multiple-Columns

     

     

    Attached files

    Read_Records_w_Different_Num_Fields - 2 Sept 2021.lna

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    Example Data file used with the example data flow:

     

     

    Attached files

    Pipe_Delim--records_w_Different_Num_Colums.txt

     

    0
    Comment actions Permalink
  • Avatar
    Martin Hamilton

    Many Thanks Adrian this worked a treat! hope you are well!

    I did have multiple prefixes to output so used a superceded transform node to split into multiple output pins

    Martin

    0
    Comment actions Permalink

Please sign in to leave a comment.