Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Problem with TextFileInputMeta

  1. #1
    Join Date
    Oct 2007
    Posts
    10

    Default Problem with TextFileInputMeta

    Am trying to use Kettle API to solve some issues... then I have a textfile input component defined like this:

    TextFileInputMeta tif = new TextFileInputMeta();
    tif.setFileName(file);
    String fromstepid = steploader.getStepPluginID(tif);

    Then When I try to run this code, the fromstepid return NULL!!!
    Am I wrong somewhere? Please help...!

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

    Default

    Did you init the StepLoader?

  3. #3
    Join Date
    Oct 2007
    Posts
    10

    Default Problem with TextFileInput

    Yes I initialized it like following:

    StepLoader steploader = StepLoader.getInstance();

    before calling String fromstepid = steploader.getStepPluginID(tif);

    Am doing something wrong? I just want to read some input file, pack data in TextFileInputFields, add those to the TextFileInput and then send them to a database using table output...
    How is this possible??
    Thanks for your help.

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

    Default

    Why don't you call the init() method?

    In version 2 it's called load()

    You could have looked at the samples (Pan, Kitchen, Spoon) as well, but I guess you have your answer now.

    Matt

  5. #5
    Join Date
    Oct 2007
    Posts
    10

    Default Problem with TextFileInput

    It worked out!!!! Thank you very much...

    But still, the main purpose of my tries is not reached... I gave a file to my
    TextFileInput component, packed in an array of TextFileInputFields, call a SelectValue to rename fields and finally an output table to send data to a table... Woaw!
    But still, am stucked somewhere...! Can't get the fields values into the database... is there any sample out there!

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.