Knime Url to File Path Error

On my local client I’m passing a knime url to a url to file path node, which works fine. The value of the path is (knime://knime.workflow/…/data) so that it looks up from root of my workflow and down to my data subdirectory. As soon as I move that to knime hub it can’t figure out what’s going on and returns an error. Is there a reason that knime hub wouldn’t be able to understand a knime url when a local client running the same version of knime (5.3.3 in this case) does?

The reason for the path format is because it doesn’t form a normal subdirectory path (knime://knime.workflow/data) and will modify it with the name of the workflow. It’s a strange behavior, but this is the workaround that works locally. The physical path it’s converting to should be something like (C:\localpath\workflowfolder\data), but that only works with the (/…/data) path format. Otherwise it creates something like (C:\localpath\workflowfolder\workflowname\data), which is wrong.

Hey there,

cannot really answer why things behave as they do, but let me share with you techniques I have been using when building on desktop and deploying to hub:

  1. using Workflow Data Area Connector node when I know all the files I read need to be read from data folder
  2. Using Extract Context Properties node to extract workflow.absolute-path, then use a Variable Expressions (legacy) node to turn the string into a path and adding data as folder to it

image

Workflow:

KNIME_project1.knwf (77.2 KB)

1 Like

Extract Context Properties is one I haven’t used yet, so I appreciate the input. I will experiment with that and see if yields some desired results.

I don’t really follow why a file name would be used as part of the path, but that’s the behavior I’m seeing. The “…” path convention works fine locally, but confuses the server so I find that surprising as well.

Thanks again.