Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Exception reading line using NIO

  1. #1

    Default Exception reading line using NIO

    I need a simple transformation to read a text file containing variable length strings and write them as-is to a single column in a table. I used the "CSV file input" step for this. I defined no delimiter character or enclosure as there is only one string ending with <LF>. I set Lazy conversion and defined only a single field called C_DATA as type string.

    When I tested this initially nothing happened, it just sat there processing that one step. So I stopped it and added a dummy delimiter string of $[FF]. This time it ran. So it looks like that step must have a delimiter defined - even when not needed.

    I develop the transformation in Windows, but the production environment is Unix. So I changed my Windows text file name and path to the Unix name and path and called the transformation using pan.sh and I received the error message "Exception reading line using NIO". I tried un-checking the Lazy conversion, but still got the same message. I then changed the delimiter from $[FF] to a dummy string of |~|~|~|~| - something that shouldn't occur in the data - and this time it worked!

    Does anyone know if I'm doing something wrong? Does the CSV input require a delimiter even when not needed? Am I using the correct step? What does the NIO exception mean?

    Thanks.

    Dave

  2. #2
    Join Date
    Jul 2009
    Posts
    17

    Default

    The CSV Input step requires a one character delimiter to be set, but you could just leave the default comma in there, or maybe use some other obscure character that doesn't occur in your data.

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    So basically we're reading a file that is not a CSV file.
    Try to modify the sample "General - Load images and store into database table.ktr".
    If you are certain about the text file encoding, say UTF-8, you can create a string from the byte[].

    Alternatively, you can use step "Load file content into memory" in Kettle v4.0 of later.

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.