Import csv file into Influxdb


I am trying to import the csv file from my laptop to influxdb and the code in my csv looks like

sample1, 22,123456789

How to import this csv file as it contains some hundreds of records like above.

Hello @AVVS_Sudheer,
What version of InfluxDB are you using?

You can use the CLI to write CSV to InfluxDB v2:

But first you’ll have to setup the CLI before using it:

Alternatively you can use a client library to write CSV data.
I find Python to be the easiest beucase you can convert it to a dataframe and write a dataframe directly to InfluxDB.


I am using Influx version 2.1.1

Hi Anai,

Thanks for your reply. When I am using the CLI as below

influx write -b bucketname -f C:\Users\downloads\sample1.csv
it is showing the below error.

Error: failed to write data: parse error on line 1, column 1: bare " in non-quoted-field

I have the value in column1 as below

and the column heading is id