Learn R Programming

mstrio (version 11.2.0)

Cube: Extract a MicroStrategy cube into a R Data.Frame

Description

Access, filter, publish, and extract data from MicroStrategy in-memory cubes

Usage

Cube

Arguments

Format

An object of class R6ClassGenerator of length 25.

Fields

connection

MicroStrategy connection object

cube_id

Identifier of a cube.

Examples

Run this code
# NOT RUN {
# Create a connection object.
connection = connect_mstr(base_url, username, password, project_name)

# Create a cube object.
my_cube <- Cube$new(connection=conn, cube_id="...")

# See attributes and metrics in the report.
my_cube$attributes
my_cube$metrics
my_cube$attr_elements

# Specify attributes and metrics (columns) to be fetched.
my_cube$apply_filters(attributes = my_report$attributes[1:2],
                         metrics = my_report$metrics[1:2])

# See the selection of attributes, metrics and attribute elements.
my_cube$selected_attributes
my_cube$selected_metrics
my_cube$selected_attr_elements

# Clear filtering to load a full dataset.
my_cube$clear_filters()

# Fetch data from the Intelligence Server.
my_cube$to_dataframe()

# See the dataframe.
my_cube$dataframe
# }

Run the code above in your browser using DataLab