Skip to content

Latest commit

 

History

History
81 lines (41 loc) · 1.66 KB

olapconnection.md

File metadata and controls

81 lines (41 loc) · 1.66 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic keywords monikerRange
OlapConnection function (olapR)
OlapConnection constructs a OlapConnection object.
rothja
jroth
07/15/2019
sql
machine-learning
reference
(olapR)
OlapConnection
>=sql-server-2016||>=sql-server-linux-ver15

OlapConnection: olapR OlapConnection Creation

OlapConnection constructs a "OlapConnection" object.

Usage

  OlapConnection(connectionString="Data Source=localhost; Provider=MSOLAP;")

  is.OlapConnection(ocs)

  print.OlapConnection(ocs)

Arguments

connectionString

A valid connection string for connecting to Analysis Services

ocs

An object of class "OlapConnection"

Details

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.

Value

OlapConnection returns an object of type "OlapConnection". A warning is shown if the connection string is invalid.

References

For more information on Analysis Services connection strings, see Connection string properties.

See also

Query, executeMD, execute2D, explore

Examples



 # 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)