-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running transform before rollups (eg how to do abs_sum_over_time) #4641
Comments
This functionality isn't supported by MetricsQL at the moment, but I think we can add |
…time functions to MetricsQL See #4641
…time functions to MetricsQL See #4641
FYI, the commit d6e22f2 adds support for sum_eq_over_time, sum_gt_over_time and sum_le_over_time functions. This commit will be included in the next release. In the mean time it is possible to test these functions by building VictoriaMetrics from this commit according to these docs. If you run cluster version of VictoriaMetrics, then you can build cluster components from the commit 5f2905d according to these instructions. |
The Now the
Closing the feature request as done. |
Is your question request related to a specific component?
metricsql
Describe the question in detail
Hi, I have a metric that has both positive and negative values. Say it is Metric_shares_traded (negative for sells). I would like to retrieve a rolling sum of the absolute value. However, when I wrap the metric I query inside abs before doing sum_over_time, I drop results as now the Metric_shares_traded is auto-wapped by default_rollup and values are dropped.
eg
sum_over_time(abs(Metric_shares_traded))
will drop randomly, especially over longer query time ranges because default_rollup does a last rollup.Similarly, trying to do sum_over_time(Metric_shares_traded > 0) - sum_over_time(Metric_shares_traded < 0) gives the same issue because Metric_shares_traded is wrapped by default_rollup before the comparison.
I think this is similar to #2020
Is there a workaround to getting what I want to work?
Troubleshooting docs
The text was updated successfully, but these errors were encountered: