OlapConnection: olapR OlapConnection Creation
In this article
OlapConnection
constructs a "OlapConnection" object.
OlapConnection(connectionString="Data Source=localhost; Provider=MSOLAP;")
is.OlapConnection(ocs)
print.OlapConnection(ocs)
A valid connection string for connecting to Analysis Services
An object of class "OlapConnection"
OlapConnection
validates and holds an Analysis Services connection string. By default, Analysis Services returns the first cube of the first database. To connect to a specific database, use the Initial Catalog parameter.
OlapConnection
returns an object of type "OlapConnection". A warning is shown if the connection string is invalid.
For more information on Analysis Services connection strings, see Connection string properties.
Query, executeMD, execute2D, explore
# Create the connection string. For a named instance, escape the instance name: localhost\my-other-instance
cnnstr <- "Data Source=localhost; Provider=MSOLAP; initial catalog=AdventureWorksCube"
olapCnn <- OlapConnection(cnnstr)