Data360 Analyze

 View Only
  • 1.  CSV Node - Variable Column Counts

    Posted 22 days ago

    Hi All,

    I was wondering if anyone has come across csv files that has variable column counts.

    For example:

    Row 1 has 8 columns

    Row 2 has 2 columns

    Row 3 has 9 columns

    I've tried adding a max of 9 field headings into the node, but it fails and advises on rows that don't equal 9 

    Anything I may be missing in filling out the csv node?



    ------------------------------
    andrew darnell
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: CSV Node - Variable Column Counts

    Posted 22 days ago

    Hi,

    Great question! I've encountered this issue before. Here's a workaround that works well:

    **Instead of configuring the CSV node to handle multiple column counts**, load the entire CSV as a single column by setting the field delimiter to a character you know won't appear in your data (for example, a pipe symbol `|` or a less common character).

    Once the file is loaded as one column, use a **Transform node** to manually split the data on the actual delimiter (comma, tab, etc.) that separates your fields.

    This gives you much more control over handling rows with varying column counts, and you can then process each row's columns individually based on your needs.

    Best regards



    ------------------------------
    Rafael Lucía
    Director
    NTASYS SOLUTIONS SL
    ------------------------------



  • 3.  RE: CSV Node - Variable Column Counts

    Posted 20 days ago

    Hi Rafael 

    Thank You for the advice, it works great!!



    ------------------------------
    andrew darnell
    Knowledge Community Shared Account
    ------------------------------