Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Unable to find First Argument in Calculator Step..

  1. #1

    Exclamation Unable to find First Argument in Calculator Step..

    I am running through the examples in the Older "Pentaho 3.2 Data Integration Beginner's Guide Book".

    On p 77 of the book it goes through using the Calculator Step and it appears to be pretty simple.

    Row 1 defines a new field: twenty, Calculation: Set field to constant value A; Field A: 20; value type: integer

    Row 2 of the Calculator configuration defines the following:

    New Field: writing2; Calculation A/B; Field A writing (from input file); Field B: Twenty
    Value Type: Number

    However, when I run/preview on the step I get the following errors:

    2011/10/09 10:51:18 - DonsCalculator - Dispatching started for transformation [DonsCalculator]
    2011/10/09 10:51:18 - CSV file input.0 - Header row skipped in file 'C:\Users\dclavio\OBJECTORIENTEDTECHNOLOGIES-4-14-08\Technologies\Pentaho\Pentaho3.2DataIntegrationSampleCode\9546_Code\source_code\pdi_files\input\examination_1lineHeader.txt'
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : Unexpected error
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : org.pentaho.di.core.exception.KettleStepException:
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : Unable to find the first argument field 'writing2 for calculation #2
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) :
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : at org.pentaho.di.trans.steps.calculator.Calculator.processRow(Calculator.java:116)
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
    2011/10/09 10:51:18 - Calculator.0 - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : at java.lang.Thread.run(Unknown Source)
    2011/10/09 10:51:18 - CSV file input.0 - Finished processing (I=104, O=0, R=0, W=103, U=0, E=0)
    2011/10/09 10:51:18 - RemoveFields.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    2011/10/09 10:51:18 - Integer to Number.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    2011/10/09 10:51:18 - Calculator.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
    2011/10/09 10:51:18 - Spoon - The transformation has finished!!
    2011/10/09 10:51:18 - DonsCalculator - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : Errors detected!
    2011/10/09 10:51:18 - DonsCalculator - ERROR (version 4.2.0-GA, build 15694 from 2011-08-24 11.46.44 by buildguy) : Errors detected!
    2011/10/09 10:51:18 - DonsCalculator - DonsCalculator

    I don't know why it would complain about not finding a variable/argument when this variable is supposed to store the result of the calculation.

    Also interesting is that the prev step only shows one output row. Not sure if that has anything to do with the error?

    Any help would be appreciated.

  2. #2
    Join Date
    Jun 2013
    Posts
    2

    Default

    Same thing here.
    I have a simple Calculator Step that takes one filed as argument A and a value as argument B.

    It stores the result of A+B in new field that I have called test.

    When I runt he transformation it gives an error saying that is 'Unable to find the second argument field 'test for calculation #1'

    Well, test is NOT an argument.

  3. #3
    Join Date
    Feb 2013
    Posts
    9

    Default

    Quote Originally Posted by Donald.Clavio@tasc.com View Post
    Also interesting is that the prev step only shows one output row. Not sure if that has anything to do with the error?
    I'm pretty sure it has something to do with the previous step.
    I just have the same problem:
    2014/03/18 15:22:25 - calc USD.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : Unexpected error
    2014/03/18 15:22:25 - calc USD.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : org.pentaho.di.core.exception.KettleStepException:
    2014/03/18 15:22:25 - calc USD.0 - Unable to find the first argument field 'usdCourseInvert for calculation #1

    'usdCourseInvert' is the output of the calculation (= New Field)

    When I check Show input fields, everything I need is there.
    But when I use preview of the step before I see, that only 5 (of 184) columns are shown.

    It seems that one of the input fields of the calculation is missing, but the error message is pointing on the wrong field.

Tags for this Thread

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.