You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As django-timescaledb does not support this feature yet, I tried integrating the the functionality, however I am facing an issue with providing the optional arguments prev and next, which are needed, if you want to interpolate the values for the first and last bucket in the desired range.
The idea was to add the following Interpolate class to the expressions.py:
File "/home/<name>/.local/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: can't adapt type 'Metric'
In the interpolate() Documentation the prev and next are sub-select statements, using the Python ORM they are getting evaluated "beforehand".
Do you have any idea, what should adapted in order to get it to work?
thanks & br
Chris :)
The text was updated successfully, but these errors were encountered:
Hi!
TimescaleDB offers a function for linear interpolation: interpolate() Documentation.
As
django-timescaledb
does not support this feature yet, I tried integrating the the functionality, however I am facing an issue with providing the optional argumentsprev
andnext
, which are needed, if you want to interpolate the values for the first and last bucket in the desired range.The idea was to add the following
Interpolate
class to the expressions.py:And use it like this:
However, the
prev
andnext
queries are evaluated into objects (Metric object (1)
andMetric object (5)
), which is obviously not compatible:This results in an error:
In the interpolate() Documentation the
prev
andnext
are sub-select statements, using the Python ORM they are getting evaluated "beforehand".Do you have any idea, what should adapted in order to get it to work?
thanks & br
Chris :)
The text was updated successfully, but these errors were encountered: