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.