Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Reding a text file line by line

  1. #1

    Default Reding a text file line by line

    I would like to read a CSV file line by line and store the content in the table defined below. The line should not be splitted into its fields.
    (Intention: I want the original line unchanged due to data lineage and data quality)

    The target table is quite simple

    CREATE csv_file
    ( int line_no,
    content text
    );

    Using the "CSV Input" step I have to provide a delimiter (otherwise I get a NullPointer Exception). The same problem with the "Text File Input" step.

    Any suggestions how I could do this?

    kind regards
    Max

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Hi Max.
    I did it once and tricked PDI using a false delimiter.
    Example, if you have a comma delimiter, use TAB.
    PDI should read the file as one unique string field.

    Mick

  3. #3

    Default

    That's the approach I currently use.

    I was just curious if there is another way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.