Skip to content
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 data saved as values #228

Open
nizovtsevnv opened this issue Mar 16, 2019 · 2 comments
Open

Tags data saved as values #228

nizovtsevnv opened this issue Mar 16, 2019 · 2 comments
Assignees

Comments

@nizovtsevnv
Copy link

nizovtsevnv commented Mar 16, 2019

I've tried write some data by examples from README.md:

irb(main):032:0> data = [
irb(main):033:1*   {
irb(main):034:2*     series: 'cpu',
irb(main):035:2*     tags:   { host: 'server_1', region: 'us' },
irb(main):036:2*     values: { internal: 5, external: 0.453345 }
irb(main):037:2>   },
irb(main):038:1*   {
irb(main):039:2*     series: 'gpu',
irb(main):040:2*     values: { value: 0.9999 },
irb(main):041:2*   }
irb(main):042:1> ]
=> [{:series=>"cpu", :tags=>{:host=>"server_1", :region=>"us"}, :values=>{:internal=>5, :external=>0.453345}}, {:series=>"gpu", :values=>{:value=>0.9999}}]
irb(main):043:0> influxdb.write_points(data)
=> #<Net::HTTPNoContent 204 No Content readbody=true>

But if I select it then get it as values, but not tags:

irb(main):044:0> influxdb.query('SELECT * FROM cpu')
=> [{"name"=>"cpu", "tags"=>nil, "values"=>[{"time"=>"2019-03-16T05:24:30Z", "external"=>0.453345, "host"=>"server_1", "internal"=>5, "region"=>"us"}]}]

Could you explain this point?

InfluxDB shell version: 1.7.4
gem influxdb (0.7.0)

@fo2w
Copy link

fo2w commented Sep 25, 2019

#181 may answer your question

@Esity Esity self-assigned this Dec 10, 2019
@ahrechushkin
Copy link

Hi, guys!
Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants