The first four columns represent the timestamp and the last column is my field value.
While importing the csv, i get this error message:
Failed to upload the selected CSV: error in csv.from(): failed to read metadata: failed to read annotations: wrong number of fields
My problem is: how do i annotate the data to declar my field value or causes the problem the construction of the timestamp? I can’t figure it out with the docs
@Robert, you’re currently using Extended Annotated CSV, which is only supported by the influx CLI. The UI only supports plain Annotated CSV. Hopefully this will change in the future, but we’ll see.
@scott that helped me a lot. it took some time but now things work like they should.
So here is me solution:
as suggested install the cli
setup a initial config for the cli, following the manual
annotate the csv file
this is my annotation snipped:
#constant measurement,2022
#concat dateTime:2006-01-02-15-4-5,${Date}-${Hour}-${Minute}-${Second}
#datatype ignore,ignore,ignore,ignore,field // concat sets already an timestamp so the colums must be ignored
Date,Hour,Minute,Second,Status
2022-01-01,0,0,0,0
2022-01-01,5,0,0,0
2022-01-01,10,0,0,0
2022-01-01,15,0,0,0
fire it up
here my commands: influx write -b yourbucket -f /path/to/your/file.csv --format csv
The hint with dryrun command was very handy.
I often have timestamps that don’t refer to the RFC3339-Format. So the concat command helps a lot to bring things into shape .
@scott Support for uploading Extended Annotated CSV in the UI would be a awesome feature. As workaround I set up an SFTP-Server to upload the files to the InfluxDB-Machine. So it would be much more comfortable