Python snippet - multiple inputs?

Is there a way to get multiple inputs into a python snippet?



Currently - no.

The only way I can think of, is to export the tables and to transfer their file paths to a python snippet. But then the python script has to handle the data import...

OK, thanks.

A bit tedious to have to do it this way - multiple inputs as a feature request then?



I'll put it into the issue list, yes. As each node has to set a fixed number of (optional) inputs: How many would have been suitable for your problem?


Two inputs would have been OK for what I'm doing - but no doubt I will need more in future!



Can you use the 'cross joiner' node on the two input tables to effectively combine them into a single table?  If you want to separate the columns apart again later, you could add a prefix to the column  names using the 'column name (regex)' node before the cross join.


I used Python Snippet node to load a data table with 25 columns, and configure this node as  "pyOut = kIn", I got the following errors:

ERROR Python Snippet       0:23       Traceback (most recent call last):
ERROR Python Snippet       0:23         File "C:\Users\326040\AppData\Local\Temp\", line 279, in <module>
ERROR Python Snippet       0:23           kIn = read_csv(r"C:\Users\326040\AppData\Local\Temp\knime2python7690386070751602870.csv", True)
ERROR Python Snippet       0:23         File "C:\Users\326040\AppData\Local\Temp\", line 193, in read_csv
ERROR Python Snippet       0:23           types = get_column_types(csv_filename)
ERROR Python Snippet       0:23         File "C:\Users\326040\AppData\Local\Temp\", line 113, in get_column_types
ERROR Python Snippet       0:23           itemType = row[index]
ERROR Python Snippet       0:23       IndexError: list index out of range
ERROR Python Snippet       0:23       Execute failed: No python output table found, check script output

Who knows how to fix this problem?