Title: | The Integration Between 'IBM COGNOS TM1' and R |
---|---|
Description: | Useful functions to connect to 'TM1' <https://www.ibm.com/uk-en/marketplace/planning-and-analytics> instance from R via REST API. With the functions in the package, data can be imported from 'TM1' via mdx view or native view, data can be sent to 'TM1', processes and chores can be executed, and cube and dimension metadata information can be taken. |
Authors: | Muhammed Ali Onder |
Maintainer: | Muhammed Ali Onder <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.1.1 |
Built: | 2025-02-24 04:02:41 UTC |
Source: | https://github.com/muhammedalionder/tm1r |
Makes a api request to tm1 server with url and body specified
tm1_api_request(tm1_connection, url, body ="", type = "GET")
tm1_api_request(tm1_connection, url, body ="", type = "GET")
tm1_connection |
tm1 connection object returned by the function tm1_connection |
url |
URL address for rest api request |
body |
body text of request |
type |
type of api request. Requests in httr package are supported like GET, POST, DELETE, PATCH |
## Not run: con_obj <- tm1_connection("localhost", "8881", "admin", "apple") url <- "https://localhost:8881/api/v1/Cubes('SalesCube')/Dimensions" tm1_api_request(con_obj, url, type = "GET") ## End(Not run)
## Not run: con_obj <- tm1_connection("localhost", "8881", "admin", "apple") url <- "https://localhost:8881/api/v1/Cubes('SalesCube')/Dimensions" tm1_api_request(con_obj, url, type = "GET") ## End(Not run)
Creates and returns a connection object to connect to TM1 via REST API.
tm1_connection(adminhost = "localhost", httpport = "", username = "admin", password = "apple", namespace="", ssl=TRUE)
tm1_connection(adminhost = "localhost", httpport = "", username = "admin", password = "apple", namespace="", ssl=TRUE)
adminhost |
adminhost of tm1 model |
httpport |
httpport of tm1 model |
username |
username to connect to tm1 model |
password |
password of the username |
namespace |
ID of namespace should be specified if there is CAM security. Should be blank for native security |
ssl |
If UseSSL parameter is T in tm1s.cfg file, then TRUE. Else FALSE. Default is TRUE |
## Not run: tm1_connection("localhost", "8881", "admin", "apple") ## End(Not run)
## Not run: tm1_connection("localhost", "8881", "admin", "apple") ## End(Not run)
Inserts a new element to the dimension
tm1_create_element(tm1_connection, dimension, element, parent="", weight=1)
tm1_create_element(tm1_connection, dimension, element, parent="", weight=1)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of dimension |
element |
Name of new element |
parent |
Name of parent of new element. Leave bland if there is no parent. |
weight |
Weight of the element as a component to the parent. Default is 1 |
## Not run: tm1_create_element(tm1_connection("localhost", "8881", "admin", "apple"), "month", "test", "Year") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_create_element(con_obj, "month", "test", "Year") ## End(Not run)
## Not run: tm1_create_element(tm1_connection("localhost", "8881", "admin", "apple"), "month", "test", "Year") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_create_element(con_obj, "month", "test", "Year") ## End(Not run)
Returns mdx as a string to use in the function tm1_get_mdx_view
tm1_create_mdx(cube, rowdim1, rowsub1, rowel1, rowdim2, rowsub2, rowel2, rowdim3, rowsub3, rowel3, coldim1, colsub1, colel1, coldim2, colsub2, colel2, titledim1, titleel1, titledim2, titleel2, titledim3, titleel3, titledim4, titleel4, titledim5, titleel5, titledim6, titleel6, titledim7, titleel7, titledim8, titleel8, titledim9, titleel9, titledim10, titleel10, rowsuppress, colsuppress )
tm1_create_mdx(cube, rowdim1, rowsub1, rowel1, rowdim2, rowsub2, rowel2, rowdim3, rowsub3, rowel3, coldim1, colsub1, colel1, coldim2, colsub2, colel2, titledim1, titleel1, titledim2, titleel2, titledim3, titleel3, titledim4, titleel4, titledim5, titleel5, titledim6, titleel6, titledim7, titleel7, titledim8, titleel8, titledim9, titleel9, titledim10, titleel10, rowsuppress, colsuppress )
cube |
Name of the cube |
rowdim1 |
Name of dimension in 1st row |
rowsub1 |
Subset of dimension in 1st row |
rowel1 |
Element of dimension in 1st row. If multiple, seperated by "|". This should be passed if subset is not provided |
rowdim2 |
Name of dimension in 2nd row |
rowsub2 |
Subset of dimension in 2nd row |
rowel2 |
Element of dimension in 2nd row. If multiple, seperated by "|". This should be passed if subset is not provided |
rowdim3 |
Name of dimension in 3rd row |
rowsub3 |
Subset of dimension in 3rd row |
rowel3 |
Element of dimension in 3rd row. If multiple, seperated by "|". This should be passed if subset is not provided |
coldim1 |
Name of dimension in 1st col |
colsub1 |
Subset of dimension in 1st col |
colel1 |
Element of dimension in 1st col. If multiple, seperated by "|". This should be passed if subset is not provided |
coldim2 |
Name of dimension in 2nd col |
colsub2 |
Subset of dimension in 2nd col |
colel2 |
Element of dimension in 2nd col. If multiple, seperated by "|". This should be passed if subset is not provided |
titledim1 |
Name of dimension in title |
titleel1 |
Element of dimension in corresponding titledim |
titledim2 |
Name of dimension in title |
titleel2 |
Element of dimension in corresponding titledim |
titledim3 |
Name of dimension in title |
titleel3 |
Element of dimension in corresponding titledim |
titledim4 |
Name of dimension in title |
titleel4 |
Element of dimension in corresponding titledim |
titledim5 |
Name of dimension in title |
titleel5 |
Element of dimension in corresponding titledim |
titledim6 |
Name of dimension in title |
titleel6 |
Element of dimension in corresponding titledim |
titledim7 |
Name of dimension in title |
titleel7 |
Element of dimension in corresponding titledim |
titledim8 |
Name of dimension in title |
titleel8 |
Element of dimension in corresponding titledim |
titledim9 |
Name of dimension in title |
titleel9 |
Element of dimension in corresponding titledim |
titledim10 |
Name of dimension in title |
titleel10 |
Element of dimension in corresponding titledim |
rowsuppress |
TRUE if zeroes are suppressed on rows |
colsuppress |
TRUE if zeroes are suppressed on columns |
## Not run: tm1_create_mdx( "SalesCube", rowdim1="account1", rowel1 = "Sales", coldim1="month", colel1="Jan", titledim1 = "actvsbud", titleel1 = "Actual", titledim2 = "region", titleel2 = "Argentina", titledim3 = "model", titleel3 = "S Series 1.8 L Sedan", rowsuppress=TRUE, colsuppress = FALSE) ## End(Not run)
## Not run: tm1_create_mdx( "SalesCube", rowdim1="account1", rowel1 = "Sales", coldim1="month", colel1="Jan", titledim1 = "actvsbud", titleel1 = "Actual", titledim2 = "region", titleel2 = "Argentina", titledim3 = "model", titleel3 = "S Series 1.8 L Sedan", rowsuppress=TRUE, colsuppress = FALSE) ## End(Not run)
Creates a new subset to the dimension
tm1_create_subset(tm1_connection, dimension, subset, element="", mdx="", overwrite=TRUE)
tm1_create_subset(tm1_connection, dimension, subset, element="", mdx="", overwrite=TRUE)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of dimension |
subset |
Name of new subset |
element |
Name of elements seperated by | for static subset |
mdx |
mdx of subset for dynamic subset |
overwrite |
TRUE or FALSE. If TRUE, subset is overwritten |
## Not run: tm1_create_subset(tm1_connection("localhost", "8881", "admin", "apple"), "month", "Q1Months", element = "Jan|Feb|Mar") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_create_element(con_obj, "month", "all", mdx = "[month].MEMBERS") ## End(Not run)
## Not run: tm1_create_subset(tm1_connection("localhost", "8881", "admin", "apple"), "month", "Q1Months", element = "Jan|Feb|Mar") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_create_element(con_obj, "month", "all", mdx = "[month].MEMBERS") ## End(Not run)
Creates cube view with mdx
tm1_create_view(tm1_connection, cube, view, mdx)
tm1_create_view(tm1_connection, cube, view, mdx)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
cube |
Name of cube |
view |
Name of view to be created |
mdx |
MDX of view as a string |
## Not run: mdx <- "SELECT NON EMPTY {[month].[Jan],[month].[Feb],[month].[Mar]} ON COLUMNS, NON EMPTY {[account1].[Price],[account1].[Units]} ON ROWS FROM [SalesCube] WHERE ( [actvsbud].[actvsbud].[Actual], [region].[region].[Argentina], [model].[model].[S Series 1.8 L Sedan] )" tm1_create_view( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "test", mdx) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_create_view(con_obj, "SalesCube", "test", mdx) ## End(Not run)
## Not run: mdx <- "SELECT NON EMPTY {[month].[Jan],[month].[Feb],[month].[Mar]} ON COLUMNS, NON EMPTY {[account1].[Price],[account1].[Units]} ON ROWS FROM [SalesCube] WHERE ( [actvsbud].[actvsbud].[Actual], [region].[region].[Argentina], [model].[model].[S Series 1.8 L Sedan] )" tm1_create_view( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "test", mdx) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_create_view(con_obj, "SalesCube", "test", mdx) ## End(Not run)
Deletes element or component from dimensions
tm1_delete_element(tm1_connection, dimension, element, parent="")
tm1_delete_element(tm1_connection, dimension, element, parent="")
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of dimension |
element |
Name of element |
parent |
Name of parent of element. If parent is specified, component delete will be done. If parent is omitted, element will be deleted from dimension |
## Not run: tm1_delete_element(tm1_connection("localhost", "8881", "admin", "apple"), "month", "test", "Year") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_delete_element(con_obj, "month", "test") ## End(Not run)
## Not run: tm1_delete_element(tm1_connection("localhost", "8881", "admin", "apple"), "month", "test", "Year") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_delete_element(con_obj, "month", "test") ## End(Not run)
Deletes subset from dimensions
tm1_delete_subset(tm1_connection, dimension, subset)
tm1_delete_subset(tm1_connection, dimension, subset)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of dimension |
subset |
Name of subset |
## Not run: tm1_delete_subset(tm1_connection("localhost", "8881", "admin", "apple"), "month", "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_delete_subset(con_obj, "month", "test") ## End(Not run)
## Not run: tm1_delete_subset(tm1_connection("localhost", "8881", "admin", "apple"), "month", "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_delete_subset(con_obj, "month", "test") ## End(Not run)
Deletes cube view
tm1_delete_view(tm1_connection, cube, view)
tm1_delete_view(tm1_connection, cube, view)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
cube |
Name of cube |
view |
Name of view to be deleted |
## Not run: tm1_delete_view( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_delete_view(con_obj, "SalesCube", "test") ## End(Not run)
## Not run: tm1_delete_view( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_delete_view(con_obj, "SalesCube", "test") ## End(Not run)
Gets configuration of tm1 instance
tm1_get_config(tm1_connection)
tm1_get_config(tm1_connection)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
## Not run: tm1_get_config(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_config(con_obj) ## End(Not run)
## Not run: tm1_get_config(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_config(con_obj) ## End(Not run)
Gets dimensions of a cube
tm1_get_cube_dimensions(tm1_connection, cube)
tm1_get_cube_dimensions(tm1_connection, cube)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
cube |
Name of a cube as a string |
## Not run: tm1_get_cube_dimensions( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_cube_dimensions(con_obj, "SalesCube") ## End(Not run)
## Not run: tm1_get_cube_dimensions( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_cube_dimensions(con_obj, "SalesCube") ## End(Not run)
Gets list of cubes
tm1_get_cubes(tm1_connection, ShowControlObjects = FALSE)
tm1_get_cubes(tm1_connection, ShowControlObjects = FALSE)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
ShowControlObjects |
If TRUE, control cubes are also listed. Default is FALSE |
## Not run: tm1_get_cubes(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_cubes(con_obj) ## End(Not run)
## Not run: tm1_get_cubes(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_cubes(con_obj) ## End(Not run)
Gets data from a cube, Supports up-to 10 dimension for now
tm1_get_data(tm1_connection, cube, element1="", element2="", element3="", element4="", element5="",element6="", element7="", element8="", element9="", element10="")
tm1_get_data(tm1_connection, cube, element1="", element2="", element3="", element4="", element5="",element6="", element7="", element8="", element9="", element10="")
tm1_connection |
tm1 connection object returned by the function tm1_connection |
cube |
Name of a cube as a string |
element1 |
Element from 1st dimension of cube. Leave empty if there is no corresponding dimension |
element2 |
Element from 2nd dimension of cube. Leave empty if there is no corresponding dimension |
element3 |
Element from 3rd dimension of cube. Leave empty if there is no corresponding dimension |
element4 |
Element from 4th dimension of cube. Leave empty if there is no corresponding dimension |
element5 |
Element from 5th dimension of cube. Leave empty if there is no corresponding dimension |
element6 |
Element from 6th dimension of cube. Leave empty if there is no corresponding dimension |
element7 |
Element from 7th dimension of cube. Leave empty if there is no corresponding dimension |
element8 |
Element from 8th dimension of cube. Leave empty if there is no corresponding dimension |
element9 |
Element from 9th dimension of cube. Leave empty if there is no corresponding dimension |
element10 |
Element from 10th dimension of cube. Leave empty if there is no corresponding dimension |
## Not run: tm1_get_data( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "Actual", "Argentina", "Total", "Sales", "Jan") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_data(con_obj, "SalesCube", "Actual", "Argentina", "Total", "Sales", "Jan") ## End(Not run)
## Not run: tm1_get_data( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "Actual", "Argentina", "Total", "Sales", "Jan") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_data(con_obj, "SalesCube", "Actual", "Argentina", "Total", "Sales", "Jan") ## End(Not run)
Gets elements of a dimension
tm1_get_dimension_elements(tm1_connection, dimension)
tm1_get_dimension_elements(tm1_connection, dimension)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of a dimension as a string |
## Not run: tm1_get_dimension_elements( tm1_connection("localhost", "8881", "admin", "apple"), "region") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimension_elements(con_obj, "region") ## End(Not run)
## Not run: tm1_get_dimension_elements( tm1_connection("localhost", "8881", "admin", "apple"), "region") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimension_elements(con_obj, "region") ## End(Not run)
Gets subsets of a dimension
tm1_get_dimension_subsets(tm1_connection, dimension)
tm1_get_dimension_subsets(tm1_connection, dimension)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of a dimension as a string |
## Not run: tm1_get_dimension_subsets( tm1_connection("localhost", "8881", "admin", "apple"), "region") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimension_subsets(con_obj, "region") ## End(Not run)
## Not run: tm1_get_dimension_subsets( tm1_connection("localhost", "8881", "admin", "apple"), "region") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimension_subsets(con_obj, "region") ## End(Not run)
Gets list of dimensions
tm1_get_dimensions(tm1_connection, ShowControlObjects = FALSE)
tm1_get_dimensions(tm1_connection, ShowControlObjects = FALSE)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
ShowControlObjects |
If TRUE, control dimensions are also listed. Default is FALSE |
## Not run: tm1_get_dimensions(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimensions(con_obj) ## End(Not run)
## Not run: tm1_get_dimensions(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimensions(con_obj) ## End(Not run)
Gets element detail of a dimension. Name, UniqueName, Type, Level, Index, and Components. element or index should be specified
tm1_get_element(tm1_connection, dimension, element="", index = 0)
tm1_get_element(tm1_connection, dimension, element="", index = 0)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
dimension |
Name of a dimension as a string |
element |
Name of element as a string |
index |
Index of element as a numeric |
## Not run: tm1_get_element( tm1_connection("localhost", "8881", "admin", "apple"), "month", "Year") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimension_elements(con_obj, "month", "", 7) ## End(Not run)
## Not run: tm1_get_element( tm1_connection("localhost", "8881", "admin", "apple"), "month", "Year") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_dimension_elements(con_obj, "month", "", 7) ## End(Not run)
Returns the list of tm1 instances in the specified adminhost
tm1_get_instances(adminhost = "localhost", port = "5898", ssl=TRUE)
tm1_get_instances(adminhost = "localhost", port = "5898", ssl=TRUE)
adminhost |
adminhost of tm1 models |
port |
port of admin server |
ssl |
If TRUE it will be accesses through https |
## Not run: tm1_get_instances() tm1_get_instances(adminhist = "localhost", port = "5898", ssl = TRUE) ## End(Not run)
## Not run: tm1_get_instances() tm1_get_instances(adminhist = "localhost", port = "5898", ssl = TRUE) ## End(Not run)
Gets server logs from a tm1 instance
tm1_get_log(tm1_connection, lognumber)
tm1_get_log(tm1_connection, lognumber)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
lognumber |
Number of how many lines of logs you want. Default is 5 |
## Not run: tm1_get_log(tm1_connection("localhost", "8881", "admin", "apple"), 10) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_log(con_obj) ## End(Not run)
## Not run: tm1_get_log(tm1_connection("localhost", "8881", "admin", "apple"), 10) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_log(con_obj) ## End(Not run)
Gets mdx view data
tm1_get_mdx_view(tm1_connection, mdx, RowElementAsColumn = FALSE)
tm1_get_mdx_view(tm1_connection, mdx, RowElementAsColumn = FALSE)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
mdx |
MDX of view as a string |
RowElementAsColumn |
if False, row elements will be attached to rownames of data frame |
## Not run: mdx <- "SELECT NON EMPTY {[month].[Jan],[month].[Feb],[month].[Mar]} ON COLUMNS, NON EMPTY {[account1].[Price],[account1].[Units]} ON ROWS FROM [SalesCube] WHERE ( [actvsbud].[actvsbud].[Actual], [region].[region].[Argentina], [model].[model].[S Series 1.8 L Sedan] )" tm1_get_mdx_view( tm1_connection("localhost", "8881", "admin", "apple"), mdx, RowElementAsColumn=FALSE) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_mdx_view(con_obj,mdx) ## End(Not run)
## Not run: mdx <- "SELECT NON EMPTY {[month].[Jan],[month].[Feb],[month].[Mar]} ON COLUMNS, NON EMPTY {[account1].[Price],[account1].[Units]} ON ROWS FROM [SalesCube] WHERE ( [actvsbud].[actvsbud].[Actual], [region].[region].[Argentina], [model].[model].[S Series 1.8 L Sedan] )" tm1_get_mdx_view( tm1_connection("localhost", "8881", "admin", "apple"), mdx, RowElementAsColumn=FALSE) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_mdx_view(con_obj,mdx) ## End(Not run)
Gets native view data
tm1_get_native_view(tm1_connection, cube, view, RowElementAsColumn= FALSE)
tm1_get_native_view(tm1_connection, cube, view, RowElementAsColumn= FALSE)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
cube |
Name of the cube |
view |
Name of the view |
RowElementAsColumn |
if False, row elements will be attached to rownames of data frame |
## Not run: tm1_get_native_view( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "Default", RowElementAsColumn=FALSE) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_native_view(con_obj, "SalesCube", "Default") ## End(Not run)
## Not run: tm1_get_native_view( tm1_connection("localhost", "8881", "admin", "apple"), "SalesCube", "Default", RowElementAsColumn=FALSE) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_get_native_view(con_obj, "SalesCube", "Default") ## End(Not run)
Logs out
tm1_logout(tm1_connection)
tm1_logout(tm1_connection)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
## Not run: tm1_logout(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_logout(con_obj) ## End(Not run)
## Not run: tm1_logout(tm1_connection("localhost", "8881", "admin", "apple")) con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_logout(con_obj) ## End(Not run)
Runs a chore
tm1_run_chore(tm1_connection, chore)
tm1_run_chore(tm1_connection, chore)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
chore |
Name of a chore as a string |
## Not run: tm1_run_chore(tm1_connection("localhost", "8881", "admin", "apple"), "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_run_chore(con_obj, "test") ## End(Not run)
## Not run: tm1_run_chore(tm1_connection("localhost", "8881", "admin", "apple"), "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_run_chore(con_obj, "test") ## End(Not run)
Runs a process
tm1_run_process(tm1_connection, process, par1name, par1value, par2name, par2value, par3name, par3value)
tm1_run_process(tm1_connection, process, par1name, par1value, par2name, par2value, par3name, par3value)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
process |
Name of a process as a string |
par1name |
Name of a parameter |
par1value |
Value of a parameter |
par2name |
Name of a parameter |
par2value |
Value of a parameter |
par3name |
Name of a parameter |
par3value |
Value of a parameter |
## Not run: tm1_run_process(tm1_connection("localhost", "8881", "admin", "apple"), "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_run_process(con_obj, "test") ## End(Not run)
## Not run: tm1_run_process(tm1_connection("localhost", "8881", "admin", "apple"), "test") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_run_process(con_obj, "test") ## End(Not run)
Send data to a cube, Supports up-to 10 dimension for now
tm1_send_data(tm1_connection, value, cube, element1, element2, element3, element4, element5, element6, element7, element8, element9, element10, increment)
tm1_send_data(tm1_connection, value, cube, element1, element2, element3, element4, element5, element6, element7, element8, element9, element10, increment)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
value |
data value you want to send to cube |
cube |
Name of a cube as a string |
element1 |
Element from 1st dimension of cube. Leave empty if there is no dimension |
element2 |
Element from 2nd dimension of cube. Leave empty if there is no dimension |
element3 |
Element from 3rd dimension of cube. Leave empty if there is no dimension |
element4 |
Element from 4th dimension of cube. Leave empty if there is no dimension |
element5 |
Element from 5th dimension of cube. Leave empty if there is no dimension |
element6 |
Element from 6th dimension of cube. Leave empty if there is no dimension |
element7 |
Element from 7th dimension of cube. Leave empty if there is no dimension |
element8 |
Element from 8th dimension of cube. Leave empty if there is no dimension |
element9 |
Element from 9th dimension of cube. Leave empty if there is no dimension |
element10 |
Element from 10th dimension of cube. Leave empty if there is no dimension |
increment |
If TRUE, it will increment cube data by Value. If False, it will replace. This parameter is ignored in sending string values. |
## Not run: tm1_send_data( tm1_connection("localhost", "8881", "admin", "apple"), 10, "SalesCube", "Actual", "Argentina", "S Series 1.8 L Sedan", "Units", "Jan") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_send_data(con_obj, 10, "SalesCube", "Actual", "Argentina", "S Series 1.8 L Sedan", "Units", "Jan", increment=TRUE) ## End(Not run)
## Not run: tm1_send_data( tm1_connection("localhost", "8881", "admin", "apple"), 10, "SalesCube", "Actual", "Argentina", "S Series 1.8 L Sedan", "Units", "Jan") con_obj <- tm1_connection("localhost", "8881", "admin", "apple") tm1_send_data(con_obj, 10, "SalesCube", "Actual", "Argentina", "S Series 1.8 L Sedan", "Units", "Jan", increment=TRUE) ## End(Not run)
Send data to a cube, Supports up-to 10 dimension for now
tm1_send_dataset(tm1_connection, valueset, cube, rowdim, coldim, titledim1, titleel1, titledim2, titleel2, titledim3, titleel3, titledim4, titleel4, titledim5, titleel5, titledim6, titleel6, titledim7, titleel7, titledim8, titleel8)
tm1_send_dataset(tm1_connection, valueset, cube, rowdim, coldim, titledim1, titleel1, titledim2, titleel2, titledim3, titleel3, titledim4, titleel4, titledim5, titleel5, titledim6, titleel6, titledim7, titleel7, titledim8, titleel8)
tm1_connection |
tm1 connection object returned by the function tm1_connection |
valueset |
data frame or matrix object holding values you want to send to cube |
cube |
Name of a cube as a string |
rowdim |
Corresponding dimension of the elements on row |
coldim |
Corresponding dimension of the elements on column |
titledim1 |
Name of dimension in title |
titleel1 |
Element of dimension in corresponding titledim |
titledim2 |
Name of dimension in title |
titleel2 |
Element of dimension in corresponding titledim |
titledim3 |
Name of dimension in title |
titleel3 |
Element of dimension in corresponding titledim |
titledim4 |
Name of dimension in title |
titleel4 |
Element of dimension in corresponding titledim |
titledim5 |
Name of dimension in title |
titleel5 |
Element of dimension in corresponding titledim |
titledim6 |
Name of dimension in title |
titleel6 |
Element of dimension in corresponding titledim |
titledim7 |
Name of dimension in title |
titleel7 |
Element of dimension in corresponding titledim |
titledim8 |
Name of dimension in title |
titleel8 |
Element of dimension in corresponding titledim |
## Not run: sdata <- tm1_connection("localhost", "8881", "admin", "apple") #valueset # Argentina Brazil #Jan 1 2 #Feb 3 4 tm1_send_dataset( sdata, valueset = valueset, cube = "SalesCube", rowdim = "month", coldim = "region", titledim1 = "actvsbud", titleel1 = "Actual", titledim2 = "model", titleel2 = "L Series 1.6 L Convertible", titledim3 = "account1", titleel3 = "Units") ## End(Not run)
## Not run: sdata <- tm1_connection("localhost", "8881", "admin", "apple") #valueset # Argentina Brazil #Jan 1 2 #Feb 3 4 tm1_send_dataset( sdata, valueset = valueset, cube = "SalesCube", rowdim = "month", coldim = "region", titledim1 = "actvsbud", titleel1 = "Actual", titledim2 = "model", titleel2 = "L Series 1.6 L Convertible", titledim3 = "account1", titleel3 = "Units") ## End(Not run)