-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Running sqlmlutils 0.7.1 in R against a SQL Server 2019 RC1 machine.
Reproduction Steps
Running a sample package call:
sql_install.packages(connectionString = ad_connection, pkgs = "data.table", scope = "PUBLIC", verbose = TRUE)
ad_connection is a local variable which represents a database where ML Services is set up correctly.
Here is the output:
2019-10-28 09:48:37.69 Starting package install on SQL server (Driver={SQL Server};Server=D2-SQL-R-02;Database=AnomalyDetection;Trusted_Connection=Yes;)...
2019-10-28 09:48:37.69 Verifying permissions to install packages on SQL server...
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open destfile 'C:\Users\KEVIN~1.FEA\AppData\Local\Temp\RtmpmaJNMP\file75603f8535cd', reason 'No such file or directory'
Warning: unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.5:
cannot open destfile 'C:\Users\KEVIN~1.FEA\AppData\Local\Temp\RtmpmaJNMP\file756038c548a9', reason 'No such file or directory'
Error: Cannot find specified packages (data.table) to install
In addition: Warning message:
In dir.create(downloadDir) :
cannot create dir 'C:\Users\KEVIN~1.FEA\AppData\Local\Temp\RtmpmaJNMP\download7560232a7e1e', reason 'No such file or directory'
Looks like it's choking on the fact that there is no RtmpmaJNMP folder in my AppData\Local\Temp. I created one and successfully installed data.table.
When installing a local package, I had received a similar warning, but the package did install correctly.
2019-10-28 09:42:55.31 Starting package install on SQL server (Driver={SQL Server};Server=D2-SQL-R-02;Database=AnomalyDetection;Trusted_Connection=Yes;)...
2019-10-28 09:42:55.31 Verifying permissions to install packages on SQL server...
2019-10-28 09:42:55.36 Copying package to Sql server [1/1] AnomalyDetection...
2019-10-28 09:42:56.54 Installing packages to library path, this may take some time...
2019-10-28 09:43:10.77 Successfully installed packages on SQL server (AnomalyDetection).
Warning message:
In dir.create(downloadDir) :
cannot create dir 'C:\Users\KEVIN~1.FEA\AppData\Local\Temp\RtmpmaJNMP\download756035966c58', reason 'No such file or directory'
Desired Outcome
I would like sql_install.packages to check if the RtmpmaJNMP folder exists and create it if it does not.
Workarounds
Creating the RtmpmaJNMP folder manually resolved my issue. After creating the folder, the install process created two files in it:
- repos_https%3A%2F%2Fcran.rstudio.com%2Fbin%2Fwindows%2Fcontrib%2F3.5.rds
- repos_https%3A%2F%2Fcran.rstudio.com%2Fsrc%2Fcontrib.rds