Open amotl opened 1 year ago
Attention: Patch coverage is 89.88764%
with 18 lines
in your changes missing coverage. Please review.
Project coverage is 78.86%. Comparing base (
90e815a
) to head (c30b6ad
).:exclamation: Current head c30b6ad differs from pull request most recent head a6d66d5
Please upload reports for the commit a6d66d5 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
8abe55d3e05 added baseline support for producing Grafana instant dashboards, and 9c663b2f576d now improves it by using proper time bucketing within the standard SQL statement template, based on emulating GROUP BY DATE_BIN()
by using Grafana's $__timeGroupAlias
macro for casting $__interval
values, until CrateDB's DATE_BIN()
function understands Grafana's native interval values.
$__timeGroup(dateColumn, $__interval)
will be replaced by an expression usable in aGROUP BY
clause.$__timeGroupAlias(dateColumn, $__interval)
will be replaced identical to$__timeGroup
but with an added column alias.-- https://grafana.com/docs/grafana/latest/datasources/postgres/#macros
Thank you for the guidance, @seut and @hammerhead.
About
Migrating to InfluxDB version 2 would mean to leave SQL behind ^1. While using the Flux query language is intriguing, and I will not reject bringing in support for InfluxDB2 and its successor IOx, supporting an SQL-based timeseries database makes sense for me, and this time maybe even a more capable one than InfluxDB in terms of broader support for data types and SQL operations.
So, I think viable alternatives are both CrateDB and TimescaleDB [^2], which may even share parts of their corresponding adapter implementations, because both are building upon PostgreSQL standards. This patch makes a start by adding support for CrateDB, let's have a look at TimescaleDB later.
Documentation
https://kotori--148.org.readthedocs.build/en/148/database/cratedb.html
Backlog
max_by
andmin_by
could also be utilized in a sensible way.[^2]: With the drawback that TimescaleDB also changed the license for parts of their code to non-FOSS, see https://github.com/timescale/timescaledb/blob/main/tsl/LICENSE-TIMESCALE.