Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: Exception in filter rows!!

  1. #1
    Join Date
    Oct 2007
    Posts
    6

    Default Exception in filter rows!!

    [IMG]file:///C:/DOCUME%7E1/AlHindi/LOCALS%7E1/Temp/moz-screenshot-4.jpg[/IMG]
    I would like to do this transformation: filter rows from table that have a year field (type: Number).
    I used
    1- [Get System Info, (system date)],
    2- [Calculator, year of date A, and I make the field type is Number],
    then I pass the result to a [Filter rows] to do this comparison:
    YEAR(field from table Input step) = currentYear (field from calculator step).

    But the following exception has occurred:
    Unexpected error found in evaluation function : java.lang.RuntimeException: Unexpected error evaluation condition [(
    YEAR = currYear
    )] in part [Composite : get first] for row: [date=2007/10/28 12:06:09.503, currYear=2007.0]
    java.lang.RuntimeException: Unexpected error evaluation condition [ YEAR = currYear
    ] in part [Atomic : get fieldnrs right exact] for row: [date=2007/10/28 12:06:09.503, currYear=2007.0]
    be.ibridge.kettle.core.exception.KettleException:
    Unable to find value for field [YEAR] in the input row!



    Please can you help me to solve this problem or use alternative way!![IMG]file:///C:/DOCUME%7E1/AlHindi/LOCALS%7E1/Temp/moz-screenshot-3.jpg[/IMG]

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

    Default

    First ... you can't have URLs to your local drive ...

    For the error... this says it all "Unable to find value for field [YEAR] in the input row!", YEAR is not in your input, so probably you entered something wrong in your filter... attach a simplified version of your transformation and we can have a look at it.

    Regards,
    Sven

  3. #3
    Join Date
    Oct 2007
    Posts
    6

    Default

    filter rows.ktr

    Dear sboden

    Kindly find the attached file that have my transformation.....

    Best Regards.

  4. #4

    Post

    try this.

    Rgds

    Samatar
    Last edited by shassan2; 05-15-2008 at 12:33 PM.

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

    Default

    @mosheikh: You make assumptions of how Kettle works which are not true

    All rows flowing into a step have of the same structure, same names, same orde, same types. That's 1. Second, you try to compare rows from one hop with rows from another hop, how will Kettle know which row to compare with which other row (the hop from "get system" will only produce one row).

    For Filter rows if you're comparing between fields, the fields have to be in the same row. So upfront you have to join your 2 hops and then pass them through filter rows. The easiest way to do this (if you have only 1 row in 1 of 2 hops) is a join... after this you will have the system date /year on every row (and only 1 output hop), and then you can run them through filter rows.

    Regards,
    Sven

  6. #6
    Join Date
    Oct 2007
    Posts
    6

    Default

    Thank you very much...

    but how can I generate system info rows to compare it with the all records in the table input (i don't know the number of rows!!)?.

    Best Regards.

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

    Default

    Use a join step and your system info will be duplicated to all of the other hops rows.

    Regards,
    Sven

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

    Default

    Or just insert the "Get system info" step into the stream of steps.
    I think somewhere around version 2.4 it gained the capacity to just add information to the input rows.

    HTH,

    Matt

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.