Tuples
import io.skipcheck.tm1.client.service.data.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
Map<String, Integer> budget = new LinkedHashMap<>();
budget.put("Jan", 1200);
budget.put("Feb", 1350);
budget.put("Mar", 1100);
List<CubeUpdatePatch> updates = new ArrayList<>();
budget.forEach((month, value) -> {
Map<String, String> cell = new LinkedHashMap<>();
cell.put("Version", "Budget");
cell.put("Region", "North");
cell.put("Month", month);
cell.put("Measure", "Revenue");
updates.add(CubeUpdatePatch.builder().bindTuple(Tuples.of(cell)).value(value).build());
});
return tm1.cells().updateCells("Sales", updates);
Members
of static | The element paths for a cell. |
element static | One element's path. |
of
staticstatic ODataPath[] of(Map<String,String> tuple)The element paths for a cell.
Parameters
tuple- dimension name to element name, for every dimension of the cube in its
order (a
LinkedHashMap); each element is in its dimension's same-named hierarchy
Returns
- one path per element, such as
Dimensions('Region')/Hierarchies('Region')/Elements('North')
element
staticstatic ODataPath element(String dimension, String hierarchy, String element)One element's path.
Parameters
dimension- the dimension's name
hierarchy- the hierarchy's name
element- the element's name
Returns
- the path,
Dimensions('d')/Hierarchies('h')/Elements('e')
Also in the Javadoc.