I am experimenting with the new List Files/Folder node. I would like to dynamically set the folder (e.g. UNC path on Windows and substitute with local mount point on KNIME server linux).
The idea is that I somehow either connect the new optional File System Port with the right folder which I would generate in the workflow. Or that I use the option to specify the path via variable.
Both is not working:
Using File System Port (dark blue)
I could not find any node that can produce a file system port from a String or URI. The nodes available in KNIME produce a port, but that does not fit (light blue).
Using the variable to input
The node does not accept String variables, but requires a variable of type P (which I’ve never seen before). I cannot select a string variable, and if I output the path after execution of the node I see the type is symbolized with a P.
I tried to use a JAVA node as I though it was more flexible to create a type P, but the node can only output string, double, int…
Can anybody help me to explain how I could set a dynamic path into the new List Files/Folder node.
Here some screenshots:
Can I ask you a few more details - do you want to create a folder inside of your workflow or in another directory outside of your workflow repository?
About your questions:
The port in the URI to port node can be use with nodes like the Port to File Cells or URI Port to Variable nodes (a fun example workflow here https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_uri_url_path_fun_with). The port system in the list files/folder node is related to file system connection, like Microsoft Sharepoint, for instance. (https://kni.me/w/DWEfzzxqw197SKyQ). One node will not connect to the other, as they carry different information (so one is light blue and the other one is dark blue).
This is a new flow variable type that is going to be used in our new file handling system. Right now, the only way to generate Path variables is using the other new file handling nodes as you did. But we do plan to make the creation of path variables easier and possible in the future.
I think if the path you are trying to point to is part of the Server, you can use the relative option in the list files/folder, and put it relative to your workflow, for instance.
Thanks Ana for your explanation.
Yes, I got the concept of the different types and I fully understand that light blue and dark blue ports are not the same.
Thanks for pointing out the Sharepoint node that creates a dark blue port. Are there any other nodes around which allow me to create a port for a local file system or network share? That’s what I would need. A relative path does not work as on the server it will be relative and on local execution it will be a network path (\server\share\file…).
Thanks for any hint!
if you want to give it a try already you can download the KNIME nightly build containing a several nodes that allow you to create those flow variables.
Thank you Mark, I am curious to see this!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.