I am trying to find a way to load an entire text file into a single cell for further downstream processing. I have found a way which works for local files (e.g. C:\myfile.txt) using the JPython Function node, with the code
open(val("column1")).read()
(column1 contains the file path - e.g. 'C:\myfile.txt'), although I'm not sure whether this then leaves python file connections open.
However, it would be nice to have something more universal, similar to the file reader node, which would handle .gz files, and also remote files supplied as urls. I've tried implementing this in the java snippet node, to no avail, and the above JPython fails for a url, as expected.
Is there any (simple!) way to achieve this?
Thanks
Steve