Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: how to do calculation for multiple inputs in calculato step

  1. #1

    Default how to do calculation for multiple inputs in calculato step

    Hi
    I have a column current balance coming from table, and max, min of same current balance column coming from a file/sql query.
    For every current balance row i want to apply the formula (current balance - min) / (max -min).
    I used the calculator step but it is giving an error unable to find argument field.

    can anyone help?? Is it because calculator doesn't accepts multiple inputs

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

    Default

    Prepare a toy transformation and someone will guide you home.
    So long, and thanks for all the fish.

  3. #3

    Default

    sample attached
    Attached Files Attached Files

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

    Default

    You are supposed to replace Table steps with a Data Grid.
    Your database connections don't work on my machine.
    So long, and thanks for all the fish.

  5. #5

    Default

    attached data grid , now some new errors are coming
    Attached Files Attached Files

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

    Default

    Calculator is no Join step.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  7. #7

    Default

    actually the constant which u are adding is coming from a file of previous job. That value will vary as per the previos job run. Can we add a constant column whco value is variable..?

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

    Default

    Well, you don't have to deliver two values in a file, but if you must, you can use a cartesian join to add those values to your main input stream.
    So long, and thanks for all the fish.

  9. #9

    Default

    cartesian join is done based on certain keys .. where as i am getting only these two value.

    My requirement is that i have a column called current balance... and i have to add one more column which is calculated as (current balance - minimum curr balance) / (current balance - maximum curr balance). minimum and maximum is calculated on the entire current balance rows!

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

    Default

    Quote Originally Posted by arpit016 View Post
    cartesian join is done based on certain keys
    Who told you so? There's not even a place to enter keys.

    You may filter the participating rows, but you don't have to.
    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.