Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
Cube.query(*measures: Measure, context: Mapping[str, bool | int | float | str] = frozendict({}), explain: Literal[False] = False, filter: CubeQueryFilterCondition | None = None, include_empty_rows: bool = False, include_totals: bool = False, levels: Sequence[Level] = (), mode: Literal[‘pretty’] = ‘pretty’, scenario: str = None, **kwargs: Unpack[_QueryPrivateParameters]) → MdxQueryResult
Cube.query(*measures: Measure, context: Mapping[str, bool | int | float | str] = frozendict({}), explain: Literal[False] = False, filter: CubeQueryFilterCondition | None = None, include_empty_rows: bool = False, include_totals: bool = False, levels: Sequence[Level] = (), mode: Literal[‘pretty’, ‘raw’] = ‘pretty’, scenario: str = None, **kwargs: Unpack[_QueryPrivateParameters]) → DataFrame
Cube.query(*measures: Measure, context: Mapping[str, bool | int | float | str] = frozendict({}), explain: Literal[True], filter: CubeQueryFilterCondition | None = None, include_empty_rows: bool = False, include_totals: bool = False, levels: Sequence[Level] = (), mode: Literal[‘pretty’, ‘raw’] = ‘pretty’, scenario: str = None, **kwargs: Unpack[_QueryPrivateParameters]) → object
Execute and MDX query. In JupyterLab withatoti-jupyterlab installed, query results can be converted to interactive widgets with the Convert to Widget Below action available in the command palette or by right clicking on the representation of the returned Dataframe.
- Parameters:
- measures – The measures to query.
-
context –
Context values to use when executing the query.
See
shared_contextfor some of the available context values. -
explain – When
True, execute the query but, instead of returning its result, return an explanation of how it was executed containing a summary, global timings, and the query plan and all its retrievals. -
filter –
The filtering condition.
Example
Single equality condition:Combined equality condition:Hierarchy condition:Inequality condition:Deep level of a multilevel hierarchy condition:Measure condition: -
include_empty_rows –
Whether to keep the rows where all the requested measures have no value.
Example
-
include_totals –
Whether to query the grand total and subtotals and keep them in the returned DataFrame.
Totals can be useful but they make the DataFrame harder to work with since its index will have some empty values.
Example
-
levels – The levels to split on.
If
None, the value of the measures at the top of the cube is returned. -
mode –
The query mode.
"pretty"is best for queries returning small results.
Example
"raw"is best for benchmarks or large exports:- A faster and more efficient endpoint reducing the data transfer from Java to Python will be used.
- The Convert to Widget Below action provided by
atoti-jupyterlabwill not be available.
Example
- scenario – The name of the scenario to query.
See also:
atoti.Session.query_mdx()