Newbie - Schema question

Sorry for the newbie question but what I am trying to achieve, but don’t really get my head around how to model the schema for this is the following:

Lets assume I have four : sunset, sunrise, dusk & dawn.
Now for every day, I want to store the exact timestamp for each if the above.
Goal is to have a graph in graphana later-on with
the day on the X axis and the timestamp on the Y-axis.

thanks for any input!

Hi @jaeti01 welcome ,

the available datatypes in influx are integer , float , boolean and string .

if you want to insert records with a time you could do it for example as follows ,

> insert events value="dawn" 1556651440000000000
> insert events value="sunset" 1556652440000000000
>  precision rfc3339
> select * from events
name: events
time                 value
----                 -----
2019-04-30T19:10:40Z dawn
2019-04-30T19:27:20Z sunset

You can also insert the data using python and the influxdb library or http
or from a file …

When using http you can use a different precision ,
I assume the precision can be seconds for your data ?
The default is ns.

hope this helps ?

best regards

1 Like