Open petetnt opened 4 years ago
It was done with flow, convert it to TS for future proofing
Following the influxdata docs, tested inside the docker container like this:
Create container
docker-compose up influxdb
docker exec -it influxdb /bin/bash
Import dataset & create database
Tested running commands inside the container as the previous command ^ suggests. These could be in Dockerfile as well.
curl https://s3.amazonaws.com/noaa.water-database/NOAA_data.txt -o NOAA_data.txt
influx -import -path=NOAA_data.txt -precision=s -database=NOAA_water_database
influx -precision rfc3339 -database NOAA_water_database
Inside the influx console
SHOW measurements
outputs:
name: measurements
------------------
name
average_temperature
h2o_feet
h2o_pH
h2o_quality
h2o_temperature
SELECT COUNT("water_level") FROM h2o_feet
outputs:
name: h2o_feet
--------------
time count
1970-01-01T00:00:00Z 15258
Example test queries from https://docs.influxdata.com/influxdb/v1.8/query_language/sample-data/#download-and-write-the-data-to-influxdb
Seems to be okay, but I'm unsure if this test is covering enough (?) If not, add some use cases that has to be tested.
This PR converts the lib to TS from Flow and fixes few minor bugs caught by the compiler, plus makes some of the output more verbose and aligns the code a bit
Fixes MOT-8