I'm trying to establish a connection between R and a Sequel Server Analysis Services (SSAS) Cube. Similar questions have been asked before here and here, but I haven't been able to find an easy answer. HTTP access through the X4R package is discussed here, but the SSAS cube I have access to is not configured for HTTP connections.
Using the RDCOMClient library, I can create an "ADO Connection" object with
con <- COMCreate("ADODB.Connection")
Following the script here, I would like to write something like
con[["ConnectionString"]] <- paste(
"Provider=MSOLAP.4",
"Server=myserver",
"Initial Catalog=mycatalog",
sep = ";")
con$Open()
to specify the connection string and open the connection. The labels myserver
and mycatalog
are set to their appropriate values based on the connection I am able to establish between Excel and SSAS.
However, my connection string is probably not correctly specified because I get the error
<checkErrorInfo> 80020009
No support for InterfaceSupportsErrorInfo
checkErrorInfo -2147352567
Error: Exception occurred.
I don't know how to debug this error either. Could someone advise
- the appropriate COM class to use (i.e. is "ADODB.Connection" correct?)
- the key-value pairs required for the "ConnectionString" element of the COM class object
- where I can find more information about these topics (the MSDN ADO MD for developers pages are quite difficult for a non-developer)
- if there is a better way to go about establishing a connection between R and an SSAS Cube