Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: text file input not reading files on server

  1. #1
    Join Date
    Aug 2008
    Posts
    7

    Default text file input not reading files on server

    Hii there,

    I am currently using Kettle 3.0.4 and I am trying read in several txt files using the text file input stage, however it does not see the file....I have had this job working, but unfortunately it is no longer seeing these files....not sure as to why....

    I have moved a single file to /tmp directory and still have no luck reading this file....when I try to get the file properties using the "show content from first data line" I get the following error message:

    "I couldn't find a valid file to work with. Please check the files, directories, & expressions."

    This message is consistent no matter where the file is located...I have checked the forum regarding the use of wildcards, and this is not the problem.

    When I attempt to run the job, I get an error message stating that, "Step [Text file input.0] failed to initialize!"

    The fact that this job has run successfully before and now doesn't, is of concern to me, I have checked all the privledges on the directories on the server and they have not changed and are ok....

    I have also tried using the get file Names stage and have had the same problem, with it not being able to see the file, no matter where it is located....

    so I am curious, has anyone else had this problem, or more to the point, know of a solution....

    All help would be greatly appreciated...

    Cheers,

    Prashant

  2. #2
    DEinspanjer Guest

    Default

    Can't help you without seeing how the step is configured.
    Did you try running in a higher logging level such as Debugging or Rowlevel to see if the step outputs any messages that might help you figure out what went wrong?

  3. #3
    Join Date
    Aug 2008
    Posts
    7

    Default

    Hi there, thanks for the prompt reply. I have tried running it in debugging mode and rowlevel logging level and basically it states the following:
    2008/09/09 12:27:33 - Text file input.0 - distribution activated
    2008/09/09 12:27:33 - Text file input.0 - Starting allocation of buffers & new threads...
    2008/09/09 12:27:33 - Text file input.0 - Step info: nrinput=0 nroutput=1
    2008/09/09 12:27:33 - Text file input.0 - output rel. is 1:1
    2008/09/09 12:27:33 - Text file input.0 - Found output rowset [Text file input.0 - Master Stored Procedure.0]
    2008/09/09 12:27:33 - Text file input.0 - Finished dispatching

    2008/09/09 12:27:33 - Text file input.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : No file(s) specified! Stop processing.
    2008/09/09 12:27:33 - Text file input - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : Error initializing step [Text file input]
    2008/09/09 12:27:33 - parseDeltaFiles - Step [Master Stored Procedure.0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - Step [checkErrorRecords.0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - Step [Dummy (do nothing).0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - Step [Get System Info.0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - Step [Modified Java Script Value.0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - Step [Select values.0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - Step [DeltaErrorTable.0] initialized flawlessly.
    2008/09/09 12:27:33 - parseDeltaFiles - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : Step [Text file input.0] failed to initialize!

    Not sure if this helps any, the step is configured with the following values:
    File/Directory --> /home/pentaho/kettle/data
    Wildcard --> staging-delta*\.txt

    Filetype --> CSV
    Seperator --> #|
    Format --> Unix

    I had already input the fields when I have this step working, but it just doesn't read them from the server anymore..

  4. #4
    DEinspanjer Guest

    Default

    staging-delta*\.txt is likely not the wildcard you want to be using. File wildcards in Kettle are true regexes, not fileglobs, so that regex would only match the following files:

    staging-delt.txt
    staging-delta.txt
    staging-deltaa.txt
    staging-deltaaa.txt
    staging-deltaaaa.txt
    and so on...

    You likely want
    staging-delta.*\.txt

  5. #5
    Join Date
    Aug 2008
    Posts
    7

    Default

    Thanks for that, the "." was the missing item not allowing the files to be accessed....it seems to be working now..

    For future reference, when using wildcards, do you have to use this .*\.txt approach or can you use the delta_*.txt???

    Thanks,

    Prashant

  6. #6
    DEinspanjer Guest

    Default

    Quote Originally Posted by DEinspanjer View Post
    File wildcards in Kettle are true regexes, not fileglobs
    You will always want to use real regular expression wildcards rather than fileglobs when working with wildcards in Kettle.

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.