kappa_sdk.user_tasks.DataQueryService#
- class kappa_sdk.user_tasks.DataQueryService(data_api, unit_converter)[source]#
Python wrapper for a Data Query Service.
Note
Should not be instantiated directly.
Methods
DataQueryService.get_metadata(vector_id)Get metadata info of the vector :param vector_id: The id of the KAPPA Automate vector.
DataQueryService.read_vector(vector_id[, ...])Reads the data values as
Vector.- Parameters:
data_api (DataAPI)
unit_converter (UnitConverter)
- __init__(data_api, unit_converter)[source]#
- Parameters:
data_api (DataAPI)
unit_converter (UnitConverter)
- get_metadata(vector_id)[source]#
Get metadata info of the vector :param vector_id: The id of the KAPPA Automate vector.
- Parameters:
vector_id (str)
- Return type:
- read_vector(vector_id, from_time=None, to_time=None, count=-1, last=False, unit=None)[source]#
Reads the data values as
Vector.All parameters are optional, if none are given it will read all values.
- Parameters:
vector_id (str) – The id of the KAPPA Automate vector.
from_time (datetime | None) – Date to start reading from.
to_time (datetime | None) – Date to read the data up to.
count (int) – Maximum count of points to return, regardless of from/to settings.
last (bool) – Will return last (count) of points if set to true.
unit (UnitEnum | None) – Convert values from internal units from a specific unit.
- Returns:
Vector– Vector that contains the requested data values.- Return type: