I’m trying to adjust a component on KNIME hub and this new IO turns out to be much less usable than before.
tl;dr: We need a node that converts knime protocol path to local file system path (Like URL to File Path)
Starting with the “easy” stuff:
Create Temp Folder:
The new Create Temp Folder doesn’t have a easy option to use the OS default temp dir: it’s either workflow related or you have to find the temp dir manually. OK, inside workflow works fine enough but this will lead to knime protocol Paths which cause issues later in this workflow.
On top of that there is nothing in the output that always a cops&paste of the generated path into a OS file explorer. When making workflows or debugging them that’s very helpful to quickly get access to generated files. But I only get this:
Which tells me nothing much were I can find the data (I need to know the local path to the workspace and go from there, very impractical), Please also output the resolved local path or at least make a “convert path to local file system” node.
The new Unzip nodes gives a warning in the dialog of unsupported file type but it actual completes without issue. The file is a pptx file. In fact all office files are just zip files with a different name so probably just add them to the list of accepted files.
Also because it got renamed to decompress maybe also adding 7z as format could be a nice addition.
Now the annoying part:
Local File Browser Configuration
My component doesn’t work anymore on KNIME 4.3 because the output of “Local File Browser Configuration” has changed. (this node in old version should actually have been deprecated due to the different output).
The “Create Temp Folder” simply output a knime:// path if configured relative to say workflow directory. And the Decompress just goes along with that. The “Create Temp Dir” had an option to use URI or Location as output and with “URL to File Path” one could easily extract thing like file name and most importantly it converted the knime:// path to actual file system paths. This isn’t possible anymore. “Path to String” just converts the Path to a String not changing it to the local file system. This is a problem if you want to use the path say in a Python snippet. The “Path to String” node needs the same functionality as URL to String or maybe even better a converter node that converts a knime path to local file system path (as already mentioned before). Knowing where my workspace is (with extract Context Node) + some string manipulation I can build the right path but it’s rather inconvenient.