Skip to main content

Hi,

Cognite grafana plugin internally use synthetic timeseies api while passing query under “time series custom query” option. but synthetic timeseries api returns error while trying to retrieve data-point for string timeseries. 

please check out attached screenshot.

Hi Mitul,

The synthetic timeseries queries can not be used for string timeseries. If you want to handle it you need to convert string timeseries to double. For further information please refer to the documentation.

Best regards,
Dilesha


Hi Mitul, 

I hope Dilesha’s answer helped. If not, please let us know!

 


When using synthetic time series you can do a mapping from string to a number to get out results, this might help your use case:

Map the strings OPEN → 1 and CLOSED → 0

map(TS{externalId='stringstate'}, t'OPEN', 'CLOSED'], O1, 0], -1)

Doc: https://docs.cognite.com/dev/concepts/resource_types/synthetic_timeseries/#convert-string-time-series-to-doubles

 


Reply