# Quote\_char not working in csv filter logstash

**URL:** https://discuss.elastic.co/t/quote-char-not-working-in-csv-filter-logstash/176386
**Category:** Logstash
**Created:** [April 11, 2019, 11:14am UTC](https://discuss.elastic.co/t/quote-char-not-working-in-csv-filter-logstash/176386 "2019-04-11T11:14:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Smack\_Alpha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smack_alpha/32/43660_2.png) [@Smack\_Alpha](https://discuss.elastic.co/u/Smack_Alpha)
#### Post date: [April 11, 2019, 11:14am UTC](https://discuss.elastic.co/t/quote-char-not-working-in-csv-filter-logstash/176386/1 "2019-04-11T11:14:56Z")

</div>

I am working on the csv filter. The Separator and the Columns works fine. I came to know that the quotes\_char assign the charater to every output i get. So in the quotes\_char, i added a "^" string. But It doesn't made any changes to the file uploaded to ES.

Here's the logstash conf file for my cars.csv file.

```
input {
   file {
      path => "/home/paulsteven/log_cars/cars.csv"
      start_position => "beginning"
      sincedb_path => "/dev/null"
   }
}
filter {
    csv {
        separator => ","
 	quote_char => "^"
        columns => ["City_mpg","Classification","Driveline","Engine_Type","Fuel_Type","Height","Highway_mpg","Horsepower","Hybrid","ID","Length","Make","Model_Year","Number_of_Forward_Gears","Torque","Transmission","Width","Year"]
    }

}
output {
  elasticsearch {
    hosts => "localhost:9200"
    index => "cs24"
    document_type => "details"
  }
  stdout{}
}

```

The sample output loaded in terminal for only one row:  
{  
"Engine\_Type" =\> "Rear-wheel drive",  
"host" =\> "smackcoders",  
"Classification" =\> ""Automatic",  
"Transmission" =\> "330",  
"Number\_of\_Forward\_Gears" =\> "2012 BMW 7 Series",  
"Model\_Year" =\> "BMW",  
"Highway\_mpg" =\> "200",  
"Hybrid" =\> "315",  
"Make" =\> "94",  
"Torque" =\> "6",  
"Year" =\> "110",  
"Width" =\> "6 Speed Automatic Select Shift",  
"@version" =\> "1",  
"City\_mpg" =\> "17",  
"@timestamp" =\> 2019-04-11T11:05:52.259Z,  
"Horsepower" =\> "25",  
"ID" =\> "False",  
"message" =\> "17,"Automatic,Transmission",Rear-wheel drive,BMW 3.0L 6 cylinder 315hp 330 ft-lbs Turbo,Gasoline,200,25,315,False,2012 BMW 740Li Sedan,94,BMW,2012 BMW 7 Series,6,330,6 Speed Automatic Select Shift,110,2012",  
"Height" =\> "Gasoline",  
"path" =\> "/home/paulsteven/log\_cars/cars.csv",  
"Fuel\_Type" =\> "BMW 3.0L 6 cylinder 315hp 330 ft-lbs Turbo",  
"Length" =\> "2012 BMW 740Li Sedan",  
"column19" =\> "2012",  
"Driveline" =\> "Transmission""  
}

There is no quote\_char in the output instead of double quotes. Then what is the use of quote\_char. Help me with some suggestions

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 11, 2019, 12:16pm UTC](https://discuss.elastic.co/t/quote-char-not-working-in-csv-filter-logstash/176386/2 "2019-04-11T12:16:20Z")

</div>

> [@Smack\_Alpha](#):
>
> I came to know that the quotes\_char assign the charater to every output i get.

quote\_char determines how the input is parsed. It has no effect on the output. The default is double-quote, so that an input line might look like this

```
"Hello, world!",Foo

```

and that would be parsed as two columns. If your input was instead

```
%Hello, world!%,Foo

```

then you could set quote\_char =\> "%" and that would be parsed as two columns instead of three.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 9, 2019, 12:16pm UTC](https://discuss.elastic.co/t/quote-char-not-working-in-csv-filter-logstash/176386/3 "2019-05-09T12:16:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
