atoti.query package¶
Submodules¶
atoti.query.auth module¶
Query Authentication.
-
atoti.query.auth.Auth= typing.Callable[[str], typing.Union[typing.Dict[str, str], NoneType]]¶ Called with the URL of the request and returns the HTTP headers necessary to authenticate it.
atoti.query.basic_auth module¶
Basic Authentication.
atoti.query.cube module¶
Query cube.
-
class
atoti.query.cube.QueryCube(name, hierarchies, measures, _session)¶ Bases:
objectQuery cube.
-
hierarchies: QueryHierarchies = None¶
-
property
levels¶ Levels of the cube.
- Return type
-
measures: QueryMeasures = None¶
-
name: str = None¶
-
query(*measures, levels=None, condition=None, scenario='Base', timeout=30, **kwargs)¶ Query the cube to get the value of some measures.
The value of the measures is given on all the members of the given levels. If no measure is specified then all the measures are returned. If no level is specified then the value at the top level is returned
- Parameters
measures (
QueryMeasure) – the measures to query.levels (
Union[QueryLevel,Sequence[QueryLevel],None]) – the levels to split on.condition (
Union[LevelCondition,MultiCondition,None]) –the filtering condition. Only conditions on level equality with a string are supported. For instance:
lvl["Country"] == "France"(lvl["Country"] == "USA") & (lvl["Currency"] == "USD")
scenario (
str) – the scenario to query.timeout (
int) – the query timeout in seconds.
- Return type
DataFrame- Returns
the resulting DataFrame.
-
atoti.query.cubes module¶
Query cubes.
-
class
atoti.query.cubes.QueryCubes(_data)¶ Bases:
atoti._mappings.ImmutableMappingManage the query cubes.
atoti.query.hierarchies module¶
Query hierarchies.
-
class
atoti.query.hierarchies.QueryHierarchies(_data)¶ Bases:
atoti._mappings.ImmutableMappingManage the query hierarchies.
atoti.query.hierarchy module¶
Query hierarchy.
atoti.query.level module¶
Query level.
atoti.query.levels module¶
Query levels.
-
class
atoti.query.levels.QueryLevels(_hierarchies)¶ Bases:
atoti._base_levels.BaseLevelsFlat representation of all the levels in the cube.
atoti.query.measure module¶
Query measure.
atoti.query.measures module¶
Query measures.
-
class
atoti.query.measures.QueryMeasures(_data)¶ Bases:
atoti._mappings.ImmutableMappingManage the query measures.
atoti.query.session module¶
Making MDX queries on existing sessions.