0

How do I generate consecutive rows in Pentaho Spoon?

I have a text file and I am using "Sample Rows" step to select every third line from the text file. But the problem with the "Sample Rows" is that I have to manually type "3,6,9,12....".

I tried adding the field name from "Add Sequence" step, but it doesn't read.

Attached Image

TylerH
  • 20,799
  • 66
  • 75
  • 101
Allen BMC
  • 27
  • 1
  • 1
  • 5

2 Answers2

1

You can add a counter using the Add Sequence step and setting the Maximim value as 3.

This will create a new field, integer, with values 1,2,3,1,2,3,...

Then, a Filter Rows step can be used on the condition that the field must equal 3, and only every 3rd row will pass to the output of the filter rows step.

nsousa
  • 4,448
  • 1
  • 10
  • 15
0

If I understood issue correctly, You can use a separate Table or file which will have input configuration for Transformations and Job.

So manually you don't need to enter 3,5,7 etc. it will read input data from input table or file.