Get Time Series Names
-
Use
advanced.get_time_series_for
to get the names of all time series for the specified entity. -
In this page:
get_time_series_for
usage
Flow:
- Open a session.
- Load an entity to the session either using session.load
or by querying for the document via session.query.
In both cases, the resulting entity will be tracked by the session. - Call
advanced.get_time_series_for
, pass the tracked entity.
Note:
- If the entity is Not tracked by the session, an
ArgumentException
exception is thrown.
Example
# Open a session
with store.open_session() as session:
# Load a document entity to the session
user = session.load("users/john")
# Call GetTimeSeriesFor, pass the entity
ts_names = session.advanced.get_time_series_for(user)
# Results will include the names of all time series associated with document 'users/john'
Syntax
def get_time_series_for(self, entity: object) -> List[str]:
...
Parameter | Type | Description |
---|---|---|
entity | object |
The entity whose time series names you want to get |
Return value | |
---|---|
List[str] |
A list of names of all the time series associated with the entity, sorted alphabetically by the name |