Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: How to resolve- could not find fields from previous steps. Check the Hops

  1. #1

    Question How to resolve- could not find fields from previous steps. Check the Hops

    Hello, I am new to kettle. I am trying to assign a constant to a field in the table output. I do not have any previous step for this add a constant step. when I try to verify the transformation , I am getting this error on this step . The transformation has multiple steps. For some fields in the table output, I have mappings defined with the fields from txt file. for some other fields , I have mappings defined with the look ups. The add a constant step returns null for show input step. so I am not sure why I am getting this error and how to resolve this. Please help.

  2. #2
    Join Date
    Sep 2013
    Posts
    235

    Default

    Can you attach a sample transformation with this error?

  3. #3
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    I'm going to assume that you are a programmer.

    I'm also going to assume that you are trying to point your incoming stream to your table output as well as having an Add Constants step pointing to your Table Output step. This is not how PDI works.

    Think of PDI as a river.
    The river has to start somewhere (Table Input, Text File Input, other steps from the Input Folder)
    You can do things to the river (sort it, filter it, etc)
    The river should go somewhere (Table Output, Text File Output, other steps from Output Folder)

    So if you want to add a constant to one field in your database, you need to do that in the "do things to the river" area... So between your Input step, and your output step, run it through your Add Constants step.

    If this still isn't clear, post what you've done, and we'll try to guide you.

  4. #4

    Default

    Thanks for the quick response. The river example is perfect. I am able to insert these add a constant steps in between the source and destination and not seeing this error any more. But I do have some other errors for missing fields . I have attached the transformation.
    Attached Files Attached Files

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    So PDI should have given you a warning when you were connecting the various lines to your table output... You have to have the same field layout any time you connect two different streams together.

    Going back to the river... If you have Acidic water, and Alkaline water both flowing in different rivers, and you join them, what is the down-river water? Acidic or Alkaline? (You can replace Acidic and Alkaline with Red and Green if that makes it easier) ...

    It's undefined.

    So... Make all the links that come into the table output look the same first, then connect them to the Table Output. (It's one table that it's going into... So the data should all look the same, right?)

  6. #6
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Actually, there is no need for splitting the rowset, if I get this right:

    Name:  IDD_Budget_Load.jpg
Views: 439
Size:  33.4 KB

    All the constants should be added in a single step.
    And it's not padding if you want to add a prefix, so better use a Java expression like "PR_" + WBS_PART_1.
    So long, and thanks for all the fish.

  7. #7

    Default

    Hi

    I have added all constants in one step. I still have couple of errors. One with the DB sequence. I have configured to use a DB sequence in the schema but I am getting the error Sequence could not be found... what I am missing here?.

    The other error is - Fields in the input steam not found in output table.

    I have used the constants in the selection criteria in the look ups and output field name from the look up is different and that is used in table output mapping.

    For example

    Using the look up, I am trying to extract a field from a table that has the name field same as the constant and then mapping the extracted field to one of the fields in the output table.

    It seems that the error is that constant field in the input stream and that is not used in any of the output mapping..


    Thanks,
    Subha

  8. #8
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Always watch out for name collisions. Use actions "Show input fields" and "Show output fields" from the step menu to sort things out.
    So long, and thanks for all the fish.

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.