Problems uploading annotated CSV via web UI

I am trying to upload an annotated CSV via the web interface (screenshot below just to be clear). My details are InfluxDB v2.3.0+SNAPSHOT.090f681737 Server: 090f681 Frontend: a2bd1f3

Initially I created a CSV using Unix epoch time (I tried with/without milliseconds and nanoseconds), and in all cases I got the following error:

Failed to upload the selected CSV: error in csv.from(): parsing time "1633885200000000000" as "number": cannot parse "1633885200000000000" as "number"

Here is my CSV that gave the above error:

#group,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
#datatype,string,long,dateTime:number,double,string,string
#default,mean,,,,,
,result,table,_time,_value,_field,_measurement
,,0,1633885200000000000,349.44,Usage_in_kWh,ElectricityUsageData
,,0,1633888800000000000,347.28,Usage_in_kWh,ElectricityUsageData
,,0,1633892400000000000,339.84,Usage_in_kWh,ElectricityUsageData

I then changed the timestamps to RFC3339 format and using some different dates…

#group,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE
#datatype,string,long,dateTime:RFC3339,double,string,string
#default,mean,,,,,
,result,table,_time,_value,_field,_measurement
,,0,2019-09-01T05:00:00Z,349.44,Usage_in_kWh,ElectricityUsageData
,,0,2019-09-01T06:00:00Z,347.28,Usage_in_kWh,ElectricityUsageData
,,0,2019-09-01T07:00:00Z,339.84,Usage_in_kWh,ElectricityUsageData

The above worked (“Hooray” message appeared), but for reasons that are unclear to me, the timestamps have changed by 1 or 2 minutes…

I have found similar posts on this forum without any resolution. Is the CSV uploader tool fully debugged? It seems like the CLI is the preferred way to load a CSV, but I would prefer to use the web UI.

EDIT: I figured out why the _time value was appearing to be off by a few minutes. The Flux query built by the Data Explorer had this statement:
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
in there. Once I removed it, the _time values are exactly correct.

Still curious as to why the uploading annotated CSV does not work.

Hello @grant1,
What’s the query that you used to create the data/screenshot you shared?

Unfortunately AnnotatedCSV must have timestamps in rfc3339 not unix.
The change in timestamps is very odd.
That feels like a bug to me. Would you please submit an issue here?

Thank you!

PS what are you using InfluxDB for? I’m always curious to learn more about what our community members are working on. Thanks!

Thank you @Anaisdg

To create the data in my screenshot, I actually just modified an annotated CSV that I downloaded from an existing similar dataset, and then deleted the unnecessary columns, changed the values, and experimented with the UNIX and RFC3339 times.

I figured out the change in Timestamps yesterday (and edited my original post towards the end). See more here: Timestamps in Influx differ by minutes (vs those loaded in NR) - General - Node-RED Forum

I am using (as you might have guessed from the Node-RED forum post) InfluxDB to store power usage by hour, downloaded from my local utility company’s website. They give each customer a unique URL, and you can download the hourly data going back 12 months. Grab it using Node-RED, put 'er in Influx and then go crazy.

1 Like