I have created a work flow with which I make calculations on data from several input files. At the end of my loop I create a table that contains the results for every file in one row per file.
Now I want to add a column to the Loop output table which contains either the file name or the path, so that I know which results belongs to which input data.
I am quite new to knime so I cannot really find a solution to this problem even if it might be quite easy to do.
Can anyone help me with that?
If you have file name and/or path as flow variable (which you probably do) then simply use Constant Value Column node to convert it to a table value in new column.
Thanks for the quick and useful answer.
Unfortunatly that still does not seem to work for me. I am not able to access the path variable with the constant value column even though it does exist and is used to read the excel files.
If you want to use a variable in the Constant Value node, it must be a string. Assuming you’ve already created a path flow variable, you need to convert it to a string flow variable.
There are a couple ways to do this:
use the Path to String node BEFORE you convert to a variable
use the Path to String (variable) node AFTER you’ve converted to a variable
If you haven’t created a flow variable for the path information, you’ll set that up first.