8

Is it possible to INSERT data into series / measurements using the SQL-like interface on InfluxDB?

Ryan Leach
  • 4,262
  • 5
  • 34
  • 71

1 Answers1

8

Yes, you can simply INSERT a Line Protocol string.

An example from Getting Started:

INSERT cpu,host=serverA,region=us_west value=0.64

A point with the measurement name of cpu and tags host and region has now been written to the database, with the measured value of 0.64.

rjdkolb
  • 10,377
  • 11
  • 69
  • 89
peterdn
  • 2,386
  • 1
  • 23
  • 24
  • 2
    Since "value" a keyword, I think it would be clearer if it were uppercased in this example (to show newbies that it's not just another tag name) – Ben Slade Dec 28 '18 at 18:39
  • 1
    Can i insert multiple values like value=0.64, value1=100?? – Hacker Apr 29 '19 at 16:23
  • @BenSlade `value` is not a keyword. It's the name of your "field". (`cpu` is the "measurement".) You can name your fields whatever you like, e.g. `temp`. @Hacker yes you can have many, e.g. `load_avg=0.64,temp=90`. – Paul A Jungwirth Oct 13 '20 at 21:12