# InfluxDB 2.7 upload csv via the UI

**URL:** <https://community.influxdata.com/t/influxdb-2-7-upload-csv-via-the-ui/56230>\
**Category:** Systems\
**Created:** [January 31, 2025, 10:28pm UTC](https://community.influxdata.com/t/influxdb-2-7-upload-csv-via-the-ui/56230 "2025-01-31T22:28:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tome92](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@tome92](https://community.influxdata.com/u/tome92)\
**Post date:** [January 31, 2025, 10:28pm UTC](https://community.influxdata.com/t/influxdb-2-7-upload-csv-via-the-ui/56230/1 "2025-01-31T22:28:18Z")

</div>

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”_

```auto
#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:

```auto
#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!

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [February 3, 2025, 11:24pm UTC](https://community.influxdata.com/t/influxdb-2-7-upload-csv-via-the-ui/56230/2 "2025-02-03T23:24:23Z")

</div>

This worked for me:

```auto
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

---

<div class="post-metadata">

**Author:** ![tome92](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@tome92](https://community.influxdata.com/u/tome92)\
**Post date:** [February 6, 2025, 3:06pm UTC](https://community.influxdata.com/t/influxdb-2-7-upload-csv-via-the-ui/56230/3 "2025-02-06T15:06:42Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [February 6, 2025, 6:31pm UTC](https://community.influxdata.com/t/influxdb-2-7-upload-csv-via-the-ui/56230/4 "2025-02-06T18:31:14Z")

</div>

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