Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: How to set default field values after a "Get rows from results" step?

  1. #1
    Join Date
    Feb 2009
    Posts
    12

    Default How to set default field values after a "Get rows from results" step?

    I have a transformation that begins with a Get rows from results step, I've defined several fields in this step. I'm wondering how I could assign a default value to some of these fields?

    The problem I'm running into is that some of my upstream transforms (all ending in "send rows to results" steps) don't contain all of the values defined in my "get rows" step. When this occurs, I get this error if a step references that field: "org.pentaho.di.core.exception.KettleException: Can not find field [FieldName] in the input stream!"

    Based on this error it appears that simply adding "FieldName" to my "Get rows from result step" does not actually add this field to the stream, this seems odd to me since I can see this field when viewing the input or output fields of a down stream step. My assumption was the field would carry a null value.

    I should add, if my upstream transform outputs all the same fields as I've defined int "get rows from results" everything works as expected.

    Thanks,
    DJ

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Make sure you have all of the fields at the moment you put the rows: add them with add constant e.g.. PDI is pretty picky about having a fixed structure for rows.

    Regards,
    Sven

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.