4

I am trying to use the Pentaho Kettle software for a few transformations on my largetables. I want to perform an operation that displays the contents of alternate rows in two different tables and then I wish to join the two tables later for further transformation.

The scripting option in the tool helps me with the executing SQL scripts for single row or multiple rows. Can anyone help me with how to select the row for this purpose.

1
  • Afraid i dont understand the question. Can you be more clear? If you're simply getting data you shouldnt be using the execute sql step, you should be using table input i'd have thought? Perhaps post a pic of your transformation so far?
    – Codek
    Jun 14, 2012 at 11:44

1 Answer 1

0

It's not very clear what your trying to achieve, but the individual elements are pretty straight forward when you break them down to their discrete steps.

I would use the following steps:

  • Table Input - allows you to make a query to a database connection with a SQL statement.
  • Filter Rows - allows you to split a row of data to two separate paths based on selected criteria in the data row.

You can achieve union of two or more separate paths by connecting them to any step type; that is, a step will process each data row from any number of input paths separately and send it down the output path. In affect, all steps perform union operations.

One critical principle to keep in mind when using Pentaho Kettle is never assume that operations happen sequentially (i.e. process 1st row, then 2nd, then 3rd, etc.). Operations happen in parallel by data row; so the 1st row can be sent down the path after the 2nd row.

Hope that helps...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.