InfluxDB Design principles, Line Protocol, Data Schema

InfluxDB design principles

  • Time ordering
  • Restricted delete and update
  • Priority of read/write over consistency
  • Schemaless design allowing discontinous data
  • Priority of datasets over invdividual points. Points do not have IDs besides their timestamp and series.
  • Assuming duplicates status for identical points. If only field value is different, update with the latest.

Line protocol

The elements of the line protocol

  • measurement
  • tag set
  • field set:
    • double quote field values
  • timestamp
# An example
myMeasurement,tag1=value1,tag2=value2 fieldKey="fieldValue" 1556813561098000000

The line protocol is whitespace sensitive and \n newlines separate single points.

measurementName,tagKey=tagValue [whitespace] fieldKey="fieldValue" [whitespace] 1465839830100400200

For further information read the documentation

Data Schema

Tabular data schema

You can use it to view raw data and return query results with annotated syntax.

  • annotation rows: describe column properties (e.g. datatype)
  • header row: column labels
  • data rows: the values defined in the header for each point
  • other columns: they are optional
    • annotation
    • result
    • table
  • group keys: use for grouping