Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Filter rows

  1. #1

    Default Filter rows

    Hello! I have a problem with this case. When I do a filter rows in some the true condition return 0 values. In the previsualitation I received the messagge: Sorry, during preview we found no rows where can be displayed for this step. In the execution, the transformation didn't anything. I want to controlate this step to I can put 0 in one table. Somebody who could help me?

  2. #2
    pstoellberger Guest

    Default

    If none of the rows meet the criteria you have defined in the filter step you won't get any rows down the "true" path

  3. #3
    Join Date
    Mar 2009
    Posts
    137

    Default

    Hi noemicr,

    I don't understand your problem. You want to use the "Filter Row"-Step to add "0" as a column to your stream?

    The "Filter Row" step is used to control the flow of the data through the transformation. So you input a row into the step -> the values are compared (as you defined it in the step) -> if the condition is true the row goes the one way, if not the data goes the other way...

    I don't see the 0 in there! And as mentioned I don't understand the question!

  4. #4

    Default

    I explain my problem. I use the transformations to do some calculation for every month. My colleague used this numbers to draw graphics. For example, the rows which the field name is "Pepe". Some month, Pepe is but others no. I have to write 0 in the table, but the problem is that in the executation when the transformation arrive this point, it do nothing. How can I do to controlate this?
    Thanks
    Last edited by noemicr; 06-23-2009 at 06:13 AM.

  5. #5
    pstoellberger Guest

    Default

    you have to define a custom handling of this problem. this is more a logical error/problem than a kettle specific one

    you can probably evaluate after the filter step how many rows are passed, and if no row is passed you can create a new one with "generate rows" that has the values you want that identify this case ... e.g 'Pepe' '0'

  6. #6

    Default

    I did a Javascript step to try to do this with the function getProcessCount with =0 and null, but the transformation do nothing.

  7. #7
    Join Date
    Mar 2009
    Posts
    137

    Default

    JavaScript sounds good in that case... maybe you could upload a ktr-file so that we can help...

    I guess it's doing nothing because no rows are passed to the JavaScript... if you set the JavaScript after the Filter step the filter will only send valid rows to the JavaScript... if there are no rows than the JavaScript does not get executed...

    So maybe you can tell us something about your data (meta-data information) or just show us the ktr-file...

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.