====== InfluxDB ======
===== Concepts =====
InfluxDB is a time series database. The official documentation provides all necessary information for using this special kind of database.
The **[[https://docs.influxdata.com/influxdb/v1.7/concepts/key_concepts/|key concepts]]** section explains the basic terms
* database
* measurement
* timestamp
* series
* point
* field
* field key
* field value
* field set
* tag
* tag key
* tag value
* tag set
* retention policy
For relational database users:
tags are like key attributes inducing index creation. The only attribute type for tags is string. Fields are not indexed but can be of four different types: float, integer, string, Boolean.
===== Download and install NOAA sample data =====
* https://docs.influxdata.com/influxdb/v1.7/query_language/data_download/
# rb: 2019-07-09
# BASH shell script,
# copied from https://docs.influxdata.com/influxdb/v1.7/query_language/data_download/
# open influx
influx -precision rfc3339 -execute
===== Data Exploration, Select =====
https://docs.influxdata.com/influxdb/v1.7/query_language/data_exploration/
===== Common Commands =====
show databases
use NOAA_water_database
show measurements
SELECT COUNT("water_level") FROM h2o_feet
SELECT * FROM h2o_feet LIMIT 5
show series
show tag keys
show field keys
create database bla
use bla
show measurements
drop database bla