-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Merge should work with a regex #72
Conversation
0.6.0 is released but this behaviour persists. Can someone provide any updates on this? |
We are still working on making InfluxDB stable and bug free. Once everything is stable we'll start working on new features. |
PS: The docs says this works, but it doesn't. Maybe update the docs for now? |
ah yes, I'll be updated VERY soon On Thu, May 15, 2014 at 7:01 PM, Edward Muller notifications@github.comwrote:
|
Is there any progress on this issue? I actually thought that this already works. If this takes longer, the section in the docs should be removed (or moved to a "Future Features" section maybe). AFAIK only single merges work, or is there a workaround to merge multiple series right now? Would be very handy for my use case. |
ok, removed and put into future features for now. On Thu, May 29, 2014 at 12:57 PM, Sebastian Cohnen <notifications@github.com
|
Ah, yes, this would be extremely useful. |
👍 |
Just figured I'd add a +1 when you guys are feature planning. |
+1 |
Unless I'm misreading the merge code (very possible!), merging two series currently merges all columns in both series. When merge() is available and functions on a regex for series names, this seems like it could be problematic from a performance perspective. I would propose that the new merge() only merge selected fields to facilitate performant aggregations across many series. If I did indeed misunderstand the code and the current merge already restricts down to only selected fields, then consider my proposal retracted. :-) |
that's a good point. The merge would have to be updated to specify which fields to merge. I was just assuming that the series being merged together would share the same fields. I'm inclined to start using named parameters in function calls like this. There are some other functions we'll be adding and it might make things clearer: -- fields has a default of *
-- can use both series and patterns but must have at least one specified
select * from merge(fields:["value"], series: ["foo"], patterns: ["/^stuff.*"])
where time > now() - 1d Although that might make another thing we want to do tricky, which is nesting these function calls. For example, say we have a function called -- randomly samples 10 percent of the series
select * from sample(series: ["foo"], algo: "random", percent: "10") We'd want to send the output of that to merge. We could have another named parameter called select * from merge(in: sample(
fields:["value"],
series: ["foo"],
patterns: ["/^stuff.*"],
algorithm: "random",
percent: "10"))
where time > now() - 1d The common pattern is that almost all of these transformation functions would support Just a thought. Another possibility for some of this is just doing nested queries. |
I don't see a commit, is there any change available for test? Thanks! |
No, I think we will do some more testing as part of the review and hopefully include it in the next release candidate if it looks promising. It may have some rough edges though. |
987efd5
to
5e9750f
Compare
Since we return an error if the same series has more than one alias this fixes #270
Is this already working? According to changelog is should however i'm getting: curl -G 'http://localhost:8086/db/metryki/series?u=root&p=root&pretty=true' --data-urlencode "q=select * from merge /stats./" Two series merge works as expected: I'm using v.0.8.5 downloaded from http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb |
you need to enclose the regex in parentheses, e.g.
|
Thanks! 😄 |
will do. On Tue, Nov 4, 2014 at 3:35 AM, user32432 notifications@github.com wrote:
|
doing:
doesn't seem to work, it should have? |
@YaronWittenstein merge queries currently don't work with continuous queries. See #1062 to track progress. |
i'm not sure this is related, but i can't get the merge to work on 0.8.8 using a 5 node cluster (no replication, 3 split):
so the regex is okay... but then i try:
|
Me too :(
Result:
Result:
|
@genofire your comment is on a PR that hasn't been updated in a year. Please open a new issue with all your relevant details so this PR can rest in peace. |
Im on nighly build and merge don't seem to work... as im collecting network stats it'd be nice to display a grafana text with the total SUM() of all the series , i hope this comes in soon |
@bechampion check out the version and documentation to this version. PS: this branch was merged, it mean that in version 0.8.4 this function are implemented. |
Like this example