I use the following script to query and retrieve data using the solr API and read the generated csv output as a csv file. I want to pass this script to run on the RShiny server. Any suggestions please?
url <- "curl 'https://[site.orgnaization.com/solr/someFolder/select?q=*:*&rows=1000&wt=csv' -L -u username:password --location-trusted -b cookie-jar.txt > C:/Folder/Filename.csv" fileConn <- file("C:/Folder/PowerShellFile.ps1") writeLines(url, fileConn) close(fileConn) system2("PowerShell", args = c("-file", "C:\\Folder\\PowerShellFile.ps1")) DataFromSolr <- data.frame(read.csv("C:/Folder/Filename.csv",header = TRUE, sep = "," , fill = TRUE ,fileEncoding = "UTF-16LE"))
bash r curl
RanonKahn Aug 17 '17 at 19:47 on 2017-08-17 19:47
source share