We have already seen the Quickform nodes to design a GUI for the Web Portal of the KNIME Server. Today we will check the "Explorer" nodes.
If you type "Explorer" in the search box of the KNIME workbench, you will get these two nodes: "Explorer Browser" and "Explorer Writer". These two nodes respectively defines a path for a file (existing or not) on a KNIME Server and copies a file onto a location on a KNIME Server.
In today's example I used "Explorer Browser" to find and read a node on a KNIME server and "Explorer Writer" to copy a local file to a location on the KNIME server.
First of all, we need a KNIME Server, with Team Space installed.
Then you need Team Space installed on your local machine (just installed, not enabled with a license file).
Now, if you drag and drop any of the data files into your workflow editor, you will automatically get a "File Reader" node configured to read this file directly from the server. Notice that the URL used in the "File Reader" node does not use the "file://" protocol anymore, but the new "knime://" protocol which refers to a KNIME server. You should get something like:
knime://knime-server-demo/KNIME_Server/data/Sentiment_Rating.csv
However, if you want to read the file on the server in a more dynamic way, you can use the "Explorer Browser" to browse your server and look for the directory containing your file. Below, you can see the configuration window of the "Explorer Browser" node. The "Browse" button allows you to browse the workflows and files on the server. The "Explorer Browser" node outputs a flow variable containing the defined path. This path can then be used as setting in a "File Reader" node.
1. to create a temporary local folder with the "Create Temp Dir" node
2. to transform the folder path into a file path by adding a filename (I used here a "Java Edit Variable" node)
3. to write the data into your just defined local filepath via a "CSV Writer" node
4. to upload the temporary file to its final destination on the server using an "Explorer Writer" node.
Below is the configuration window of the "Explorer Writer" node. It requires:
- the filepath of the file to upload in the form of a flow variable
- the target location on the server
RSS Feed