Create a file on Knime server and have access to it through the Generic Javascript View Node

Hello,

I have a workflow that write a CSV file based on an automatic temp path.

Second step : I conserved the path (1); I replace each ""character by “\” in a second variable (2); and I save the file on the server with the Explorer Writer node (3).

Third step : In a Generic Javascript View node (in a wrapped metanode), I test if the file exists through the 3 variables I created

Fourth step: I use the csv reader node based on the first generated path, and look if I can read the file

RESULT in local:
var 1=> file doest not exists according Javascript (whereas it exists on the disk)
var 2=> file doest not exists according Javascript (whereas it exists on the disk)
var 3=> file exists on the server
The CSV reader node can read the file with the first var

RESULT on the Knime server through the webportal:
According Javascript, all 3 variables does not correspond to a file
BUT the CSV node is working!

QUESTION:
How can I have access to the file through the Javascript node? I want to apply JS functions on the files.

I add my workflow in case my JS checks are not the good ones.

test.knwf (35.8 KB)

Thanks in advance,

Lionel

Note: I am on a preconfigured Azure VM with Knime server

Hi Lionel,

I think the answer to this forum post could help:

Christian explains what’s actually possible and shows workarounds.

Best,
Martyna

Hi Martyna,

Thanks for the link.

I finally found the workaround to write the files in the tomcat directory to then have access to them by https://

But clearly the solution would be to have access to file inside the temp directory of the jobs. This seems not to be possible for the moment.

Regards,

Lionel