skipcheck

TM1 client · Docs · Reading and writing data

Tuples

from skipcheck_tm1.values import Tuples

Cell coordinates, as TM1 binds them: one element path per dimension of the cube, in the cube's order.

# A budget for North, one value per month, written in one request
budget = {"Jan": 1200, "Feb": 1350, "Mar": 1100}
updates = []
for month, value in budget.items():
    cell = {"Version": "Budget", "Region": "North", "Month": month, "Measure": "Revenue"}
    updates.append(CubeUpdatePatch.builder().bind_tuple(*Tuples.of(cell)).value(value).build())
tm1.cells.update_cells("Sales", updates)

Members

of staticThe element paths for a cell.
element staticOne element's path.

of

static
of(tuple: Mapping[str, str]) -> list[ODataPath]

The element paths for a cell: tuple maps dimension to element, for every dimension of the cube in its order; each element is in its dimension's same-named hierarchy. One path per element, such as Dimensions('Region')/Hierarchies('Region')/Elements('North').

element

static
element(dimension: str, hierarchy: str, element: str) -> ODataPath

One element's path: Dimensions('d')/Hierarchies('h')/Elements('e').