# Newbie - importing data from CSV

**URL:** <https://community.influxdata.com/t/newbie-importing-data-from-csv/27401>\
**Category:** InfluxDB 2\
**Created:** [November 17, 2022, 8:18am UTC](https://community.influxdata.com/t/newbie-importing-data-from-csv/27401 "2022-11-17T08:18:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marconi](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@marconi](https://community.influxdata.com/u/marconi)\
**Post date:** [November 17, 2022, 8:18am UTC](https://community.influxdata.com/t/newbie-importing-data-from-csv/27401/1 "2022-11-17T08:18:54Z")

</div>

Hi, I need some help on importing data from CSV…

Some fields can have empty values. For example:  
`
#datatype dateTime:02/01/2006 15:04:05,ignored,double,double
Date/Time,Counter,Battery SOC [%],Battery Voltage [V]
04/10/2022 05:32:00,5000,,24.55
`

the influx write command reports a conversion error  
`column ‘Battery SOC [%]’: strconv.ParseFloat: parsing “”: invalid syntax`

Empty fields indicate that the data has not been collected and I cannot replace them with zeroes. Is there a way to override this error?

I’m using the `influx write` command with the `–errors-file import_errors` option but, even if there are errors reported during the conversion (such as the one above) the _import\_errors_ file is always empty

my CSV files use semicolons instead of commas. I tried to add this line at the top of the file  
`sep=;`  
but it did not work (write command reports no data found because it is unable to parse lines)

Thanks for your help!

---

<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:** [November 29, 2022, 6:58pm UTC](https://community.influxdata.com/t/newbie-importing-data-from-csv/27401/2 "2022-11-29T18:58:55Z")

</div>

Hello @marconi,  
you’re on the right track.  
You could also also try using:

> **[Write CSV data to InfluxDB | InfluxDB Cloud Documentation](https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/csv/#skip-rows-with-errors)**
>
> Use the influx write command to write CSV data to InfluxDB. Include annotations with the CSV data to determine how the data translates into line protocol.

I’m not sure why the flag isn’t working…are you using two hyphens though? `--errors-file`  
Your CSV needs to meet the requirements described here:

> **[Write CSV data to InfluxDB | InfluxDB Cloud Documentation](https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/csv/#influx-write-command)**
>
> Use the influx write command to write CSV data to InfluxDB. Include annotations with the CSV data to determine how the data translates into line protocol.

Semicolons won’t work.  
You could also try using the Telegraf file plugin:

> <https://github.com/influxdata/telegraf/blob/master/plugins/inputs/file/README.md>
