-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
tags not returned in query result #1696
Comments
This is fixed by #1632 and in rc3 |
I tried both rc3 and rc4 and I still do not get tags back, of course now it is using '{"points": [{"fields": {"value": 1}, "tags": {"pk": "pk1"}, "name": "my.test", "timestamp": 1422921600000, "precision": "ms"}, {"fields": {"value": 2}, "tags": {"pk": "pk2"}, "name": "my.test", "timestamp": 1423008000000, "precision": "ms"}], "precision": "ms", "database": "processed"}' and it returns '{"results":[{"series":[{"name":"my.test","columns":["time","value"],"values":[["2015-02-03T00:00:00Z",1],["2015-02-04T00:00:00Z",2]]}]}]} |
It seems tags are not used, |
@dashesy -- can you please provide a complete script, which uses |
Here is what I did to see latest master: rm ~/xdev/gocodez/bin/influxd
rm -rf ~/.influxdb/
go get -u -f ./...
go build ./...
~/xdev/gocodez/bin/influxd -config /home/dashesy/influxdb.conf Then build db: curl -G 'http://localhost:8086/query' --data-urlencode "q=create database mydb"
curl -G 'http://localhost:8086/query' --data-urlencode "q=CREATE RETENTION POLICY mypolicy ON mydb duration 7d REPLICATION 1 DEFAULT" Then add 2 records: curl -XPOST 'http://localhost:8086/write' -d '{"points": [{"fields": {"value": 1}, "tags": {"pk": "pk1"}, "name": "test", "timestamp": 1422921600000, "precision": "ms"}, {"fields": {"value": 2}, "tags": {"pk": "pk2"}, "name": "test", "timestamp": 1423008000000, "precision": "ms"}], "precision": "ms", "database": "mydb"}' Then query: curl -G 'http://localhost:8086/query' --data-urlencode "q=select value from test" --data-urlencode "db=mydb And this is the results (no tags): {"results":[{"series":[{"name":"test","columns":["time","value"],"values":[["2015-02-03T00:00:00Z",1],["2015-02-04T00:00:00Z",2]]}]}]} This was for the sake of this test but when I use my Pandas library here I see same results. |
I am seeing this with RC4. @pauldix |
@dashesy Can you try this again with RC6? Also, if you want the tags returned, you'll have to group by them either explicitly:
Or do this
|
@pauldix Yes it works now! I can now start using InfluxDB more seriously, thanks. |
I am encountering the same problem (with 0.9.1 stable version), and trying to get the RC6 as suggested above - but couldn't find it in the downloads page here Is it the Version 0.9.3 (Nightly) that has this fix? |
I am sorry - please ignore my previous question. I was checking the results in the admin (web) interface and it was only showing the fields (and not tags) in the html table. But when looked at the curl results, looks like the data has the tags specified properly in the stable version (0.9.1). Thanks for supporting it. |
…gress-bar Add completion step to progress bar in onboarding wizard
I create 2 records like this:
'{"points": [{"timestamp": 1422921600000, "tags": {"pk": "pk1"}, "values": {"value": 1}, "name": "my.test", "precision": "ms"}, {"timestamp": 1423008000000, "tags": {"pk": "pk2"}, "values": {"value": 2}, "name": "my.test", "precision": "ms"}], "precision": "ms", "database": "processed"}'
There are 2 tags one for each record, now I query the series with
'select * from my.test'
and this is what is returned:'{"results":[{"rows":[{"name":"my.test","columns":["time","value"],"values":[["2015-02-04T00:00:00Z",2],["2015-02-03T00:00:00Z",1]]}]}]}'
There is no mention of tags.
The text was updated successfully, but these errors were encountered: