InfluxDB 2.7 upload csv via the UI

Hello,

Im in the process of testing and for convinience i want to load files through the UI as a CSV Import.
Now while doing so i get the same error consistenly
“Failed to upload the selected CSV: error in csv.from(): failed to read metadata: failed to read annotations: wrong number of fields”

#group,false,false,true,true,false,false,false,false,false
#datatype,string,dateTime:RFC3339,string,double,double,double,double
#default,candlestick,,,,,,,
_measurement,_time,_field,open,high,low,close,_value
,2023-01-01T09:30:00.000Z,AAPL,150.0,152.0,149.5,151.0,100000
,2023-01-02T16:00:00.000Z,AAPL,151.0,153.0,150.5,152.5,120000
,2023-01-03T09:30:00.000Z,AAPL,2700.0,2720.0,2690.0,2710.0,80000
,2023-01-04T16:00:00.000Z,AAPL,2710.0,2730.0,2705.0,2725.0,85000

the above is a sample data that i try to use, while on the other hand i can upload this sample from the documentation:

#group,false,false,true,true,false,false,true,true,true,true
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string,string
#default,mean,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,host,region
,,0,2022-12-31T05:41:24Z,2023-01-31T05:41:24.001Z,2023-01-01T00:52:00Z,15.43,mem,m,A,east
,,1,2022-12-31T05:41:24Z,2023-01-31T05:41:24.001Z,2023-01-01T00:52:00Z,59.25,mem,m,B,east
,,2,2022-12-31T05:41:24Z,2023-01-31T05:41:24.001Z,2023-01-01T00:52:00Z,52.62,mem,m,C,east

to me at least it does not look like i’m missing something and the number of fields also seem to match.
I can load it via the cli or endpoints, but it bothers me that i could not from the UI, can someone guide me on what i am missing?

Thank you!

This worked for me:

csvData= "
#group,false,false,true,true,false,false,false,false,false,false
#datatype,string,long,string,dateTime:RFC3339,string,double,double,double,double,double
#default,candlestick,,,,,,,,,
,result,table,_measurement,_time,_field,open,high,low,close,_value
,,0,m,2023-01-01T09:30:00.000Z,AAPL,150.0,152.0,149.5,151.0,100000
,,0,m,2023-01-02T16:00:00.000Z,AAPL,151.0,153.0,150.5,152.5,120000
,,0,m,2023-01-03T09:30:00.000Z,AAPL,2700.0,2720.0,2690.0,2710.0,80000
,,0,m,2023-01-04T16:00:00.000Z,AAPL,2710.0,2730.0,2705.0,2725.0,85000" 

csv.from(csv: csvData)

with flux

@Anaisdg yes that seems to work after adding, result, table headers to the csv file, i could not find in the referenced documentation above that those are required for the manual upload through the UI

@tome92 they’re always required for annotated csv. Glad it works now :slight_smile: