Skip to main content
Parked

Cognite Data Fusion: Move Magic Datapoint Granularity Selection Algorithm From Direct Query to the API

Related products:API and SDKs
  • September 1, 2022
  • 2 replies
  • 69 views

Ben Brandt
Seasoned

I have been playing around with the excellent DirectQuery preview functionality and really enjoyed that I can simply give it a timestamp range and it figures out how many points I need and what the granularity will be with the assumption that I will use the queried data for some visualization.  Even if someone has an 8K monitor with no border around their chart, with one pixel per point the most I could possibly need would be 7680 datapoints.  Reality is that we need much less since we show a datapoint as more than a pixel width.  But I don’t have to care about that complexity.  Cognite calculates optimal granularity for me.

 

Can this feature also be available via the API for “Retrieve data points”?
https://docs.cognite.com/api/v1/#tag/Time-series/operation/getMultiTimeSeriesDatapoints

Maybe we would be able to set granularity to “auto” then the magic happens?

 

2 replies

Ben Brandt
Seasoned
  • Author
  • Seasoned
  • September 1, 2022

Once the magic is implemented in the API then the implementation in DirectQuery gets simplified, right?


Anita Hæhre
Seasoned Practitioner
Forum|alt.badge.img+1
  • Head of Community
  • October 27, 2022
NewParked