Search code examples
rssasolap-cube

Using X4R package in R to connect to a SSAS cube?


I am trying to figure out how to use X4R package to load a cube into R workspace. My server name is "//vmtest//xmla2//msmdpump.dll"" and the cube name is "Ocube_MANMartCube".

I couldn't find a way to connect to cube yet. I tried the following code:

library(X4R)
handle<-xmlaConnect(url="//vmtest//xmla2//msmdpump.dll"")

The message I am getting is <?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Header><BeginSession xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:mustUnderstand="1"></BeginSession></Header><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement></Statement></Command><Properties><PropertyList></PropertyList></Properties></Execute></Body></Envelope>.

With the above output, R becomes busy and non-responsive. I am sure I have user access & I can connect to cube using Excel.

Am I doing everything right? There isn't any examples in the internet to go with. Probably someone who is familiar with the package and knows how it works can shed some light here.


Solution

  • stick to this article http://msdn.microsoft.com/en-us/library/gg492140(v=sql.105).aspx

    and here is the article for MS AS 2014

    http://msdn.microsoft.com/en-us/library/gg492140.aspx

    of course there is also an article for MS AS 2012

    Some time ago X4R did not support Windows-Authentication, meaning that either you have to configure IIS for anonymous access (I would not do this) or you have to provide a user and a pwd within your R script

    Then the connection will work.

    Hope this helps