Configure a component with variable names and default values in a file

Is it possible to loop through rows or flow variables inside a component to add configurations to that component? I tried this and similar approaches but it only creates one configuration, the last one in the loop:

Hi @wpitt ,
could you, please, provide me with you WF and a bit more specifics of what exactly you want to do, if possible?
It would be easier to see your input data table and to understand, based on it, how you want your configuration dialog to look like.
Thanks.
Best,
Daria

1 Like

Hi Daria,

thanks for getting back to me on this. I have a table, which I create from a json file, which looks like this:

Row ID, variable_value, variable_name
name, Fred, name
input_file, /data/file.csv, input_file
params_list, [0.1, 1.0], params_list

these variable_value, variable_name pairs can be different depending on the input json file. Iā€™d like to create a component that reads the json file and creates the configuration options for the component automatically. I suspect that I will need to hard code each configuration, but if you know a better solution, that would be much appreciated.

Best,

Will

1 Like

Hi @wpitt,
thanks for your answer. Now it gets a bit more clear to me.
From the first message I got the impression that you want to do looping inside of the component to create a configuration options to the same, this component? If yes, I am a bit unsure than what do you want to achieve with that? Or was your intention to use the component on the screenshot to create the configuration options for another component?

The behaviour you experienced is expected, judging by looking at the screenshot you have provided. Essentially, what happens is each loop iteration overwrites the configuration option created by String Configuration node.

Maybe this node could be interesting to consider here: Table Row To Variable Loop Start ā€“ KNIME Community Hub?
Looking forward to your answer to continue.
Best,
Daria

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.