Loops over database tables

All,

I am trying to build a sequence of joins over a set of tables that share a common structure. I would like to iterate over the table names, and have the end of the loop be a joiner, so that columns rather than rows are appended to the final data.

Has anybody tried to do so, and if so how?

Thanks

Marco

Hi.

Did something like that. First Iterated List of Files, then resulting table (which is appended by rows) was partially pivoted (Pivoting) and partially grouped (GroupBy) and then joined (Joiner).

How far this is suitable for you, depends on your data structure.

More global method might be after reading each file to Transpose it before passing to loop end node, then in resultant table hack the rowIDs according to your needs and Transpose it again.

WBR,

Kitsune

 

This post may be of help:

http://tech.knime.org/forum/knime-general/bug-using-loop-end-column-append

Apologies - I should have made my question more specific. I am looking to iterate over database tables. So I want KNIME to produce different query strings where the table name is taken from a variable.

Thanks

Marco

Hi Marco,

This is an example where one would use the loop support in KNIME. The trick is to create a list of tables (e.g. Create Table node or from an external source), inject them into a loop with the TableRow To Variable Loop Start and the append/join the column at the end of each loop iteration with the Loop End (Column Append). I have attached an example workflow that shows how it works.

Hope this helps,

  Thomas