Skip to content

Tags data saved as values  #228

Description

@nizovtsevnv

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions