relative path

#1

Hello,
I have a file in a shared location, when i read the shared location through a Knime desktop the WF is working. But when I try to run the workflow through server it says file cant be found.
How can i pass the relative path to file reader in Knime desktop so the WF works even through server?
the relative path is like //hello/howareyou/shared folder/hello how are you.csv

Thanks

0 Likes

Knime Server not picking up any location
#2

Hello @pruthvi1286 -

You can definitely use KNIME relative workflow paths to make workflows portable between your local Analytics Platform and server. We have a short bit in our e-learning course that explains how these work, including a video:

https://www.knime.com/knime-introductory-course/chapter2/section1/absolute-and-relative-paths-knime-protocol

Relative paths can be a bit confusing at first, so let me know if you need more help. :slight_smile:

EDIT: You may also find this tidbit from our blog helpful - scroll down to the section on portability: https://www.knime.com/blog/tips-tricks-for-using-knime-analytics-platform-today-bunny-ears-metanodes-co

0 Likes

#3

Hello ScottF,
Thanks for the reply
I’ve tried this video earlier. As i am using a file from network location , some how the errors keeps on popping up.
It would be really great if you can provide a sample WF accessing a network location with a relative path.
Thanks a lot

0 Likes

#4

EDIT: access a file from location that is out of C: (out of the local machine)

0 Likes

#5

Ah, I misunderstood your original question. If you’re trying to access files on a shared server, have your tried this syntax (in e.g. the File Reader node)?

file:\\NetworkShare\sharedfolder\helloworld.txt

0 Likes

#6

Hello ScottF,
so my question is
I am able to run the file reader from my knime desktop(analytics platform).
But the same WF, when run through the Knime server I get the error saying : cannot access the file/cannot find path to the specified file.(even for a file on local)
the absolute path you suggested, it runs through when ran in local, but when ran from server it doesnt work and i receive the above mentioned error.
How can we handle this ?
How should we give the path?
do we need to add any constraints (path locations) in knime server installation location?
A sample WF accessing the FILE READER for a local file will be appreaciated.
Thanks

0 Likes

#7

Just a stupid question: are you sure that the shared folder, as well as being accessible from your local PC, is also accessible from the server?

0 Likes

#8

yes there is access.
Do you have any sample WF where you scheduled it to server which contains a file reader that reads data from a network path
i am a bit confused on how to give the path of the file in shared location to file reader.
THanks

0 Likes

#9

Try this syntax in file reader node:
file:////<server>/<shared-folder>/<filename>

by replacing:

  • <server> with the network name of your file server
  • <shared-folder> with your shared folder path (use / character as directory separator)
  • <filename> with your file name
0 Likes

#10

Unfortunately I don’t think that an example workflow is going to solve the issue. It seems likely there is a system configuration issue here.

I talked to one of our support engineers, and he suggested that this might be a permissions problem. Since KNIME Server runs as its own user, it may not have the same access to files on another system that your user account does. You could try to resolve this by either

  • allowing permissions on the share for the KNIME user account
  • changing the KNIME Server service to run as YOUR account

If that doesn’t solve your problem, could you provide a bit more information about your setup? What type of KNIME Server do you have (small, medium, large) and what OS are you using on all machines involved? Are there any error messages that you are consistently seeing?

Sorry for the trouble. No worries, we’ll get it figured out.

0 Likes

#13

Hello ScottF,
Where can I find the option changing KNime server service to run as YOUR account
THanks

0 Likes

#14

(I’m assuming this is Windows OS.)

Open the Services Manager on your server machine (services.msc from a command prompt) and find the KNIME Server Local service. Edit it, choose a different account to log on with as shown below, and restart the service.

If you’re not on Windows - or this just doesn’t work for you - please provide the systems info I asked about in a previous post so I can assist better.

0 Likes

#15

Thanks for that @ScottF,
It is not working.
I am constantly running the follwing Machine:
There are messages for workflow “CA Tickets_YTD_ser 2019-04-10 13.40.50”
File Reader 2:1 - WARNING: Can’t access ‘file:////stg_frkmaepmnas1.ad.us.####.com/epm_dev_nas/CA%20Shared/##%20-%20FIS,%20incidents%20opened%20YTD.csv’. (\stg_frkmaepmnas1.ad.us.####.com\epm_dev_nas\CA Shared\MMC - FIS, incidents opened YTD.csv (The account used is a computer account. Use your global user account or local user account to access this server))
I am using an Windows OS and Large server

0 Likes

#16

OK, since you have a Server Large license, let me get you connected with some of our support folks via our ticketing system. I’ll send a PM shortly to get some additional info from you.

0 Likes