Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Problem with condition of Filter rows

  1. #1
    Join Date
    Feb 2011

    Default Problem with condition of Filter rows


    I've a filter rows with this condition:

    soc_ass_accomp = N and anno = to_number(to_char(sysdate, 'YYYY'))

    whera anno is a number.

    But I've an error in attachment
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2008



    PDI is not Oracle.
    If you want to use PDI to do your ETL, you need to work in PDI terms, not in Oracle terms. If you want to work in Oracle terms, work in Oracle.

    Your error.log shows:
    Unexpected error evaluation condition [AND ANNO = [to_number(to_char(sysdate, 'YYYY'))]
    couldn't convert string value 'to_number(to_char(sysdate, 'YYYY'))' to a big number.
    these are both because you are trying to use a PDI comparison with Oracle language.

    What is the field type of anno? Right-click on the Filter Rows step, and select "Show Input Fields" This will tell you what type it is. It may be a number, it might be a date, this depends on how your table is set up.
    You can chain together your Input Step(s) with a "Get System Info" step which can add the System Date to the data stream. You can then add a calculator step to grab the year out of the System Date, and put it in a number. When you are comparing number to number PDI will work happily.

    You may be able accomplish the same filtering in your Table Input. In that case, you are working within Oracle, and can use Oracle language. However, if this filtering depends on a PDI step, you have to use the Filter Rows step.

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.