Absolute and Relative Paths: the knime:// Protocol

In reader and writer nodes, you can specify the file full path or you can use the relative path. Indeed the file path can be expressed relatively to the LOCAL workspace or even to the workflow folder.

Benefits of choosing a relative path over a full path include better portability and structure overview.

If using a relative path, you can move your workflow from one location to another and, as long as the same data-to-workflow structure is preserved, the workflow will run successfully in the new location as well.

In addition, if your data file is visible in the KNIME Explorer panel, this will allow for a better overview of workflows and data and for an easier creation of data access nodes through a simple drag and drop operation.

 

 

 

Reference workflow is available in the EXAMPLES server under:
01_Data_Access/01_Common_Type_Files/06_Table_Reader01_Data_Access/01_Common_Type_Files/06_Table_Reader*

Exercise

  • Create a workflow group named “data” under folder “Exercises” in your KNIME Explorer panel.
  • Copy file adult.csv into the “data” folder.
  • In workflow “ETL_Basics”, read file adult.csv with a File Reader node, using the file relative path with the knime:// protocol.

 


* The link will open the workflow directly in KNIME Analytics Platform (requirements: Windows; KNIME Analytics Platform must be installed with the Installer version 3.2.0 or higher)

LinkedInTwitterShare