# Using the csv output plugin

**URL:** <https://discuss.elastic.co/t/using-the-csv-output-plugin/103008>\
**Category:** Logstash\
**Created:** [October 6, 2017, 12:56pm UTC](https://discuss.elastic.co/t/using-the-csv-output-plugin/103008 "2017-10-06T12:56:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@Cristian](https://discuss.elastic.co/u/Cristian)\
**Post date:** [October 6, 2017, 12:56pm UTC](https://discuss.elastic.co/t/using-the-csv-output-plugin/103008/1 "2017-10-06T12:56:50Z")

</div>

Hi All,  
I use the http\_poller plugin to import data and get it in a nice json format. I also use the filter "split" to split the docs on "candles" and get this:

```
{
     "@timestamp" => 2017-10-06T12:48:01.197Z,
    "granularity" => "D",
       "@version" => "1",
     "instrument" => "EUR_USD",
        "candles" => {
          "volume" => 27536,
        "closeMid" => 1.167945,
         "highMid" => 1.17158,
         "openMid" => 1.17114,
          "lowMid" => 1.16692,
            "time" => "2017-10-05T21:00:00.000000Z",
        "complete" => false
    }
}

```

In kibana I just refer to the fields as`"candles.highMid"` . Now that I want the output to csv as well how do I refer to these fields within "candles"?  
This dont work (closeMid will be empty - other columns will have values):  
csv{  
fields =\> ["closedMid","instrument","granularity"]  
path =\> "../CSVEXPORT/csv-export.csv"  
}  
Neither do this work (closeMid will be empty - other columns will have values):  
csv{  
fields =\> ["candles.closedMid","instrument","granularity"]  
path =\> "../CSVEXPORT/csv-export.csv"  
}  
Any suggestions how to refer to these fields within candles in the output to csv?

Br  
Cris

---

<div class="post-metadata">

**Author:** ![Cristian](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@Cristian](https://discuss.elastic.co/u/Cristian)\
**Post date:** [October 6, 2017, 1:19pm UTC](https://discuss.elastic.co/t/using-the-csv-output-plugin/103008/2 "2017-10-06T13:19:27Z")

</div>

Im sorry for this. Wasnt reading the manual properly.

Nested fields should be referenced as "[nested][field]"

This thread may be closed 🙂

---

<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:** [November 3, 2017, 1:19pm UTC](https://discuss.elastic.co/t/using-the-csv-output-plugin/103008/3 "2017-11-03T13:19:27Z")

</div>

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