I am really struggling with using relative filepaths on the KBH.
I tried different things:
simple ‘relative to this workflow’: this throws an error and says, the file is not there. Which is outright just not true. It is there. I can see it on the KBH, both in the KAP and in KBH (through the browser itself). Also, I made sure that there is no typo or anything
Switched to Space Connector instead: works fine in the workflow (when executed on the hub) but my data app simply does not accept it. Says, no access or can’t connect.
Isn’t that overall the idea behind relative paths? KNIME even teaches this in their learning materials and hence this whole setup seems to throw random errors for at least no obvious reason.
Is there any setting that is required for data apps specifically to access files on a folder?
E. g. my data workflow is stored in the folder /06 - Data Apps/ (see screenshots below) whereas the table I want to read is stored in /03 - Data Storage/
So the path (relative to workflow) originally looks like this “../../03 - Data Storage/my_table_to_be_loaded.table”. But again, this throws me an error of “Execute failed: The specified file ../../03 - Data Storage/my_table_to_be_loaded.table does not exist”
@kowisoft Please keep in mind that workflows and apps executed in Hub are run inside a container. As such relative paths typically resolve relative to the temp space inside the container where the workflow is cached for execution, and not to any of the spaces in Hub. To access files stored in Hub you should use the Space Connector. This connector should be configured with your hub instance, the space were your desired data resides, and the path or working directory within that space containing the data in question (i.e. /03 - Data Storage).
The Space Connector will attempt to access the space with the credentials used to run the workflow or app. If the user or team running it doesn’t have access to the data location you may encounter permissions or access errors. You should be able to work around this limitation by ensuring all users of the workflow have access to the data files, or by using the KNIME Hub Authenticator node to specify the hub instance and application password to use. Using the KNIME Hub Authenticator node in conjunction with the Space Connector can help ensure access to the space anywhere the workflow or app is run.
Hmm… not really sure what you want to tell me here. I used the space connector, as mentioned in my initial post. And again, it works in an ad hoc run. So why doesn’t it work in a data app? You have data apps everywhere as one of your USPs so I would expect it works after a simple test with an ad hoc run. Tbh, right now the whole KBH is becoming a huge pain. So what exactly needs to be done to make this work with the space connector?
just a hunch: I did not have the exact scenario, but when Ad hoc execution worked and Data App deployment didn’t one cause was the Scope (User or Team) that can be configured in Advanced Settings when you create your deployment.
From memory this impacted how certain credentials my workflow required were fetched and with the incorrect setting it would fall over.