Renaming or customizing the node type name with an instance name - not label or comment

Hello, I am new to what appears to be the very powerful Knime platform. However, I am struggling with something fundamental.

I would like to be able to rename the instance of a given node type to something meaningful. Something that would have context and bring understanding when referenced as the prefix to associated variables later in the flow.

I have experimented with labels, comments and descriptions, in both modern and classic UI (using 5.4.4), but not of those objects can be used to reference the node in later logic.

The node “type?” names and instance numbers visible in the UI are actually pretty distracting. The icons themselves can do a good job of identifying the node types. I think this may have been considered at some point as I note that I can disable the node type name display in the classic UI. I can’t see this option in the modern UI. And while helpful, in that you could hide them and rely on the node label (classic) or node comment (modern), to better visually understand the flows, unfortunately I don’t think I can use either of these (well them same thing likely) in referencing them in variables.

What I am trying to do is incorporate a concise, descriptive/meaningful node name into output file names.

I did read best practice guide, but I think it basically confirms above. KNIME Best Practices Guide

Finally, interestingly and frustratingly, AI (ChatGPT) suggested this could be done taking me on a bit of wild goose chase looking for a details configuration window on the right hand side and all kinds of other sensible suggestions for options that ultimately don’t appear to exist. LOL (sort of).

Anyway, any confirmation of suggestions on how to approach this would be welcome. How can I name or identify node instances visually in the editor AND utilize said names or identities in variables.

eg: If I have an Excel Writer type node, I would like to name it something like “WriteEmployeeJobs” and in the configuration of the node use the custom node name in the file configuration (which I understand will take some more manipulation given you can’t concatenate strings in the filename specification). Hopefully that captures the idea. The text “Excel Writer”, especially when there are multiples of them in a flow, become meaningless. WriteEmployeeJobs would have meaning.

Thanks all!!

I’m puzzled why you want to change the node name rather than just adding a comment with the filename and using a flow variable to create a file path for the Excel Writer. I don’t think there is a way to do what you want without digging into the KNIME code. People smarter then me might suggest a way. The attached workflow works for a single Excel Writer in a workflow. There may be a way to use multiple Excel Writers, but it would probably entail using some pretty complicated looping. An alternative would be to use a single Excel Writer and rewrite the path inside a loop.

2 Likes

Hello. First I want to thank you very much for the thoughtful response and example. To be totally honest I am not certain I fully understand all of the example yet. Further, I am getting an error due to missing node extension (Node Annotator), and it is not resolved by a search for an extension. I also got an error about using 5.4.4 vs. your 5.5. something. Checking for updates doesn’t find any updates. The usual unrelated to the actual issue challenges/frustrations. LOL

Regardless, I think it does demonstrate why I would like to rename instances of nodes.

First, if I open the flow in classic UI and disable to the node names, given you created some good comments (or labels), turning off the display of the node names helps with understanding and readability IMO (see below). What value do the node names provide greater than the label (I think calling a label would encourage better use) and the icon?

The reason I would like to have a the ability to have a node instance name, or even have a node label accessible as a flow variable, would be the ability to incorporate it into folder variables with ease. If I have a number of Excel Writers in a flow, like the one that you have in your example, and I label or name them intelligently, something like what you have, say “Employee Jobs Output”, by implementing a convention of incorporating the node name/label into the file path variable, I could consistently have files produced with names consistent with the visible node name/label. This would bring clarity to consumers of the file, who only have the svg representation of the workflow AND I would not have to manually and error prone set the value in the node or an earlier variable. I hope that makes sense. Still looking at your flow. :slight_smile:

The Node Annotator node is available in NodePit. My workflow creates a workflow variable with the base file name exactly like the comment. As far as turning off the KNIME node names, we’ll have to agree to disagree. To me it makes the workflow much less readable. Its impossible to know what a specific node does. Arbitrary renaming makes portability very difficult. I ran the workflow in KAP 5.4.4 with Node Annotator installed and it ran fine. You may need to reset the first Row Filter node.

1 Like

Once again, many thanks.

For newbies like myself, I had to enable NodePit as an extension source under preferences.

Then CGPT informed me that Node Annotator was in the NodePit Power Nodes extension.

From there, you’re correct, I had to reset the Row Filter node that is pulling the Excel Writer node from the Time Info output - which is an interesting node/approach to getting an inventory of all the nodes in the flow and then perhaps filtering out pertinent nodes.

It is functional and I will experiment with this concept to perhaps leverage the node comment as desired. All the best!

1 Like