The knime:// Protocol Is Not Supported In Many Reader/Writer/Utility Nodes

While perhaps it may be considered a bit outdated, there are still some scenarios in which I find manipulating a knime:// protocol for reading/writing files much more convenient than trying to achieve the same effect through file system connections and path variable manipulation.

While most of the readers/writers support the knime:// protocol through the “Custom/KNIME URL” option, I noted that it’s strangely absent from the following nodes (as of version 4.5.2) – note this list may not be exhaustive:

  • List Files/Folders
  • Image Writer (Table)
  • Transfer Files (only the “Destination” option)
  • Transfer Files (Table)
  • Decompress Files (only the “Destination” option)
  • Create Folder
  • Create Temp Folder
  • Delete Files/Folders

I am always able to find workarounds so these aren’t major road blocks, but the workarounds typically prove to be a bit more cumbersome in comparison to simply manipulating a knime:// protocol string and passing it as a path variable.

Is there a reason that these nodes lack this particular option (i.e., “Custom/KNIME URL”)? If not, would it be possible to eventually add this option into these nodes to make them consistent with all the other readers/writers?

It would make my life just that much easier. :slightly_smiling_face:

(And, as always, thank you for all the fine work you put into this program – it is a wonderful tool.)

7 Likes

Hello @jude_ran ,
thanks for your feedback. I agree this seems odd in the first place that some nodes support Custom/KNIME URLs and some don’t. The reason is that URLs in general do not support various operations required by these nodes such as listing or deleting of files or creating a folder. We could internally treat KNIME URLs differently from other URLs but decided against it because of the new KNIME specific file systems that have the same functions as the KNIME protocol.

If I understand you correctly you use the KNIME protocol because it is easier to manipulate than a path. We are working on this. What you can do right now is use the Create File/Folder Variables node to create new path variables. For more flexibility you can have a look at the Column Expressions node that comes with a lot of nice path manipulation functions. With the latest release you can also create new paths e.g. local or relative paths directly within the node:

With the next release we will add support for file paths to the Variable Expressions node which will make it easier to create path variables e.g. to local files or relative paths.

We are always happy about feedback. So if you want to try out the path functions in the Variable Expressions node download the nightly build for here and open the PathVariableExamples workflow which will automatically install the KNIME Expressions extension with the required nodes.
PathVariableExamples.knwf (11.2 KB)

The nice thing about using the path functions instead of string manipulation is that they will automatically use the correct path separator depending on the used file system and operation system and also provide nice helper methods to get file parents and path parts etc.

I hope this will make it easier for you to work with the new file handling nodes. If not let us know and we can think of another solution.

Bye
Tobias

5 Likes

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