Bill Poling
2018-Aug-06 15:31 UTC
[R] help with read function in Azure Data Lake Remote environment
Hi,
Locally I am using windows:
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Locally on my laptop using RStudio I normally set my working directory and read
in my csv files.
setwd("C:/WHP/Appeals")
getwd()#-----------------------------Check to verify
read.csv("WHP_EditAppealRev_Tmp V1.csv",nrows=1, head=FALSE)#N=61
columns
appdf1 <- fread("WHP_EditAppealRev_Tmp
V1.csv",select=c(5,9,10,11,14,15,16,17,18,25,31,28,32,42,45,46,47,48,49,53,54,58,59,61),header=TRUE,
stringsAsFactors=TRUE)
This all works fine locally.
Now I am working in RStudio in a Remote desk top AZURE Data Lake environment
(DSVM) however the remote file path out there is does not appear to be that
different.
Remotley I am using windows:
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server >= 2012 x64 (build 9200)
setwd("C:/Users/sysAdmin/Documents/WHP/NJDemo082018")
getwd()#-----------------------------Check to verify
The directory gets set but the csv does not get read for some reason?
read.csv("C:/Users/sysAdmin/Documents/WHP/NJDemo082018/TestDemoV1.csv",nrows=1,
head=FALSE)#N= columns
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file
'C:/Users/sysAdmin/Documents/WHP/NJDemo082018/TestDemoV1.csv': No such
file or directory
demo1 <-
fread("C:/Users/sysAdmin/Documents/WHP/NJDemo082018/TestDemoV1.csv",select=c(1,2,3),header=TRUE,
stringsAsFactors=TRUE)
Error in
fread("C:/Users/sysAdmin/Documents/WHP/NJDemo082018/TestDemoV1.csv",
:
File 'C:/Users/sysAdmin/Documents/WHP/NJDemo082018/TestDemoV1.csv'
does not exist; getwd()=='C:/Users/sysAdmin/Documents/WHP/NJDemo082018'.
Include correct full path, or one or more spaces to consider the input a system
command.
I have tried moving the csv file further forward to the root C: but still no
luck?
read.csv("C:/TestDemoV1.csv",nrows=1, head=FALSE)#N= columns
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'C:/TestDemoV1.csv': No such file or directory
Any suggestions would be appreciated, thank you.
WHP
Confidentiality Notice This message is sent from Zelis. ...{{dropped:15}}