
Extracts the contents of a MicroStrategy cube into a R Data.Frame. This function is deprecated.
Check out the to_dataframe() from the Cube class. Cube
get_cube(connection, cube_id, offset = 0, limit = 1000)# S4 method for connection
get_cube(connection, cube_id, offset = 0,
limit = 1000)
MicroStrategy REST API connection object
Unique ID of the cube you wish to extract information from
(optional) To extract all data from the report, use 0 (default)
(optional) Used to control data extract behavior on datasets with a large
number of rows. The default is 1000. As an example, if the dataset has 50,000 rows,
get_cube()
will incrementally extract all 50,000 rows in 1,000 row chunks. Depending
on system resources, a higher limit (e.g. 10,000) may reduce the total time
required to extract the entire dataset
R Data.Frame containing the cube contents
# NOT RUN {
# Extract the contents of a cube into an R Data.Frame
my_cube <- get_cube(connection = conn,
cube_id = "5E2501A411E8756818A50080EF4524C9")
# Extract the contents in larger 'chunks' using limit.
# May require add'l server processing time.
# As a rule-of-thumb, aim for a limit setting around 10%
# to 20% of the total number of rows in the cube.
my_cube <- get_cube(connection = conn,
cube_id = "5E2501A411E8756818A50080EF4524C9",
limit = 100000)
# You can also set limit to -1. Use this only on smaller reports.
my_cube <- get_cube(connection = conn,
cube_id = "5E2501A411E8756818A50080EF4524C9",
limit = -1)
# }
Run the code above in your browser using DataLab