cancel
Showing results for 
Search instead for 
Did you mean: 

Can we read or write a file from our local machine? If yes, how can we achieve it?

Dhivya_Aroma1
New Contributor III

I have a csv file in my local, can I read it using File Reader / Directory Browser.

When I tried with the below settings in Directory Browser

image

I get this error
{

“error”:“Error browsing the directory contents.”

“stacktrace”:“java.nio.file.NoSuchFileException: /C:/Users/Dhivya Aroma/Documents/Mck Project Work Docs/Support Work\n\tat sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)\n\tat sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)\n\tat sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427)\n\tat java.nio.file.Files.newDirectoryStream(Files.java:589)\n\tat com.snaplogic.snaps.binary.DirectoryBrowser.getAttributes(DirectoryBrowser.java:526)\n\tat com.snaplogic.snaps.binary.DirectoryBrowser.lambda$displayAttributes$1(DirectoryBrowser.java:506)\n\tat net.jodah.failsafe.Functions$11.call(Functions.java:263)\n\tat net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145)\n\tat net.jodah.failsafe.SyncFailsafe.get(SyncFailsafe.java:69)\n\tat com.snaplogic.snaps.binary.DirectoryBrowser.displayAttributes(DirectoryBrowser.java:504)\n\tat com.snaplogic.snaps.binary.DirectoryBrowser.process(DirectoryBrowser.java:327)\n\tat com.snaplogic.snap.api.ExecutionUtil.process(ExecutionUtil.java:106)\n\tat com.snaplogic.snap.api.ExecutionUtil.execute(ExecutionUtil.java:70)\n\tat com.snaplogic.snap.api.SimpleSnap.execute(SimpleSnap.java:70)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:815)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.executeForSuggest(SnapRunnableImpl.java:662)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:871)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.access$000(SnapRunnableImpl.java:121)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl$1.run(SnapRunnableImpl.java:410)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl$1.run(SnapRunnableImpl.java:406)\n\tat java.security.AccessController.doPrivileged(Native Method)\n\tat javax.security.auth.Subject.doAs(Subject.java:422)\n\tat org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:405)\n\tat com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:121)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n”

“reason”:“/C:/Users/Dhivya Aroma/Documents/Mck Project Work Docs/Support Work”

“resolution”:“Please try again.”

“status_code”:“error”

5 REPLIES 5

dmiller
Admin Admin
Admin

Do you have a Groundplex on that machine?


Diane Miller
Community Manager

Dhivya_Aroma1
New Contributor III

No, we dont have the Groundplex installed on the machine.

If there is no Groundplex on that machine, and the Groundplex machine (which is where the execution takes place) cannot reach the nominated file system, it will not be able to browse or read/write it.

dmiller
Admin Admin
Admin

I don’t think File is supported within the Directory Browser Snap (I see it listed in the examples, but not in the supported protocols, so I’ve asked the Doc team to verify it), but it is supported in File Reader with the following restriction:

The file:/// protocol is supported only on Groundplex. In Cloudplex configurations, please use sldb or other file protocols. When using the file:/// protocol, the file access is conducted using the permissions of the user in whose name the Snaplex is running (by default Snapuser ). File system access is to be used with caution, and it is the customer’s own responsibility to ensure that file system is cleaned up after use.


Diane Miller
Community Manager