Skip to main content
Solved

Synthetic timeseries api returns error for string timeseries

  • November 29, 2022
  • 3 replies
  • 44 views

Forum|alt.badge.img

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.

Best answer by Dilesha Kodithuwakku

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

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+1

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


  • Seasoned Practitioner
  • 223 replies
  • December 2, 2022

Hi Mitul, 

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

 


Murad Sæter
Practitioner
  • Practitioner
  • 48 replies
  • February 6, 2023

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'}, ['OPEN', 'CLOSED'], [1, 0], -1)

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

 


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings