orca icon indicating copy to clipboard operation
orca copied to clipboard

Run orca from Microsoft SQL Server R Services

Open sailera19 opened this issue 6 years ago • 5 comments

Because the old static image export with webshot is deprecated, I am trying to change my code to use orca. The code runs on a Microsoft SQL Server 2017 with Machine Learning Services 9.3 installed. R Version is 3.4.3. Issue also occurs when I try to use Python instead. When I execute the code like this it runs forever. `EXECUTE sp_execute_external_script @language = N'R' , @script = N' library(plotly) if (!require("processx")) install.packages("processx")

p <- plot_ly(z = ~volcano) %>% add_surface()

orca(p, "surface-plot.png") ';` I suspect that it has something to do with the exit code behavior of the command line tool: image When calling the same code from RTerm on the same machine with the same user it is working.

sailera19 avatar Nov 30 '18 10:11 sailera19

Hi @l0wsk1ll3d, Thanks for reaching out. Unfortunately this is a setup that the orca devs won't be able to reproduce very easily.

@cpsievert, do you have any thoughts on the R component of this scenario?

jonmmease avatar Dec 03 '18 11:12 jonmmease

If you need any help on reproducing or testing I am happy to assist.

sailera19 avatar Dec 03 '18 12:12 sailera19

Might be a PATH issue? What does Sys.which("orca") give you in that environment?

cpsievert avatar Dec 03 '18 16:12 cpsievert

EXECUTE sp_execute_external_script @language = N'R' , @script = N' OutputDataSet <- as.data.frame(Sys.which("orca"));'; returns me "C:\PROGRA~1\orca\orca.exe", which is the correct location of orca on this server.

sailera19 avatar Dec 04 '18 07:12 sailera19

@l0wsk1ll3d To further assist you, it would be useful to report the process' standard output and standard error you are getting when making your system call to Orca. It would provide us with more information on the error you're getting.

antoinerg avatar Jan 16 '19 00:01 antoinerg