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

穿精又带淫゛_ 提交于 2019-12-24 13:29:39

问题


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.


回答1:


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




回答2:


You need a URL for the connection, and you've given what looks like a windows network address.

This page has some info on setting up xmla access in various servers, and gives some examples URLs which should follow the same pattern as you need. Specifically you will probably need the IP name or address of the server.



来源:https://stackoverflow.com/questions/27558601/using-x4r-package-in-r-to-connect-to-a-ssas-cube

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!