Newbie - importing data from CSV

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!

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

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:

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