I need to pass a variable that contains a dynamic path to a Google Drive Connector node. The Working Folder flow variable appears to accept parameters, but you can’t leave the working directory value empty, which will then not overwrite the value. How does this node accept dynamic values as my folder structure will change each reporting period?
Also why isn’t path information natively passed between compatible nodes like the file reader? It’s connected by a common port, but no variable can be used. I’m sure I’m not the first person to need to do something like this.
Then, I need an Excel Reader node to also read from that same path, but I’m getting a null value when I try to pass it. So how are these nodes supposed to communicate?
I also noticed the String to Path node is flipping the uri format from forward slashes to windows backslashes, which is confusing other nodes. The Excel Reader can only accept a path data type when passing it as a flow variable and if the String to Path node is flipping it to a windows format and the String Manipulation node doesn’t have a path data type it seems to be a bit of a problem retaining the correct format. How exactly is that conversion supposed to take place especially when Google can’t pass a path value to the Excel Reader by way of the File Connector port?
I looked for a URI path formatter but so far everything I’ve tried errs out. Seems like Knime should have a logical way to normalize paths between nodes.
Are you able to share the workflow you are having issues with for connect to google drive.
With the pathing normalization, a useful node I have personally used is:
The simplest way to normalize it is to convert it to a absolute path. Also, i believe to grab the absolute path of a google drive you will need to mount the google drive to a file system so you can also use absolute paths to access it.
There are ways to mount it, but typically easiest would be to use a third party app like cloud mounter or something similar.
Hi, I tried that with Python/Java, converting it to a gs:// uri, but it still ran into issues when I tried to assign it to a flow variable of type path. However, today I tried something different with the file system property and discovered I just need to change the file system to mountpoint and it won’t convert uri to windows format. Take a look and see if it’s of use to you.
As a Knime team member perhaps you can shed further light on this node. I presume the default behavior of LOCAL is based upon the o/s you’re working on, such that if I had been working on Linux it would inherit its native path convention. Is that accurate, as I haven’t had a chance to test it? Thx.
The path does change depending on the OS you are on; I have made a simple workflow that grabs some file using the knime relative pathing and converts it to absolute path and the absolute path gets resolved based on the OS you are on.
Now personally, I have ran into issues if you do not handle the pathing properly particularly in any ‘code’ nodes such as python script when going between windows and mac, but typically if you do not have these nodes I have not had any issues switching between different OS.