4

I have two transformations inside one job in kettle. the first transformation read data from a csv file and sorted the data. At the end of the 1st trans I use copy rows to result step. In the 2nd trans, I begin with get rows from result step followed by a text file output step.

The job looks like this: job

Trans1 and trans2 are as follows:

image2

The job runs well, so do trans1 and trans2, except that in Trans2 there is no data read and not data written.

According the answers to similar questions I checked the box "copy previous results to parameters" and "execute for every input row" under Advanced tab. Then I go to the parameters tab and click button"Get Parameters" button. No parameters were returned. Instead I got error in log saying "cfgbuilder - Warning: The configuration parameter [org] is not supported by the default configuration builder for scheme: sftp"

I've tried all the advise given to similar question but still so confused why it doesn't work. I don't think this is a version issue of Pentaho Spoon. Any advise will be welcomed. Thanks in advance!

One suggestion I received ia that I need to edit the get variable step manually.enter image description here

April Liu
  • 41
  • 4
  • Hey April, it works for me in Pentaho 6 with the simple copy rows and get rows steps... Have you checked if the input fields in step "get rows" in trans2 were set correctly? You have to set them manually .. – Seb Mar 16 '16 at 10:02
  • you should not check `execute for every input row` – bolav Mar 16 '16 at 10:20
  • @bolav Thank you for your reply! I added a new link to image in the question, so pls feel free to check it out. Do you mean that for this dialog I have to MANUALLY type all the field names here as in the picture? I thought at least there should be a get variables button or something but I could not find any. – April Liu Mar 16 '16 at 14:21
  • @bolav BTW, I tried typing the field names in a smaller data set but still it cannot get data from the last transformation. – April Liu Mar 16 '16 at 14:38
  • The `Get rows from result` will get all the rows from the result, but they will not be available in the editor unless you fill out all the fields. How do you fill out the fields that `test output` shall output? – bolav Mar 16 '16 at 14:46
  • yes, you have to fill in all fieldnames manually. for the second Transformation the fields are unknown, only available in the job. as an idea: Text file Output in Trans_1, Input in Trans_2, if this would be helpful... – Seb Mar 16 '16 at 15:08
  • I did not fill out the fields in test output. The way I did is that I run the first trans to make sure that the last step(Copy rows to result has the out put fields that I need), then I go to trans2 and manually input the fields in get rows from result step. After that I can click the "Get Fields" button in test output and populate the fields. I run the job and it's all good, but still the read,write, input and output number in execution results window in trans2 are all 0. That's the reason why I don't think trans2 get data prom trans1 – April Liu Mar 16 '16 at 18:47

1 Answers1

0

To use the Get rows from result step you don't need to check the option Copy results to parameters.

I had a similar problem with Pentaho Server 8.0. It was a simple job with 2 transformations. The first one with a Copy rows to result at the end and the second one starting with a Get rows from result. I used a Write to Log step to help me debug things and was geting nothing from output. My specific problem was that I was declaring some Parameters on the properties of the second transformation, and with that specific version of Pentaho this was messing with the results metadata. When I cleared the parameters, the Write to Log started to show all the output I was expecting. I tested that same job on Pentaho 9.4 and that problem didn't happened.

flashfs
  • 111
  • 3