# How to rename elasticsearch columns?

**URL:** <https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930>\
**Category:** Logstash\
**Created:** [April 5, 2018, 12:58pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930 "2018-04-05T12:58:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)\
**Post date:** [April 5, 2018, 12:58pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/1 "2018-04-05T12:58:08Z")

</div>

Hey community, I just import CSV into ElasticSearch but I would like to know if I had possibility to rename these columns :  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5c2f4dc7199d902fe7c5ff7163e3cbe0aec71c7b.png)

```
"BloquÃ© par le filtrage par rÃ©putation" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "Date de dÃ©but" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },

```

Thanks for answers ! 🙂

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 5, 2018, 1:19pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/2 "2018-04-05T13:19:11Z")

</div>

You need to reindex and make sure you are using UTF8 as for character encoding.

---

<div class="post-metadata">

**Author:** ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)\
**Post date:** [April 5, 2018, 1:23pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/3 "2018-04-05T13:23:41Z")

</div>

The problem is that it's the CSV that I'm importing that produces these weird characters ... And I can not change the export encoding of my CSV ☹

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 5, 2018, 1:37pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/4 "2018-04-05T13:37:53Z")

</div>

What do you use to import the CSV ?

---

<div class="post-metadata">

**Author:** ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)\
**Post date:** [April 5, 2018, 1:49pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/5 "2018-04-05T13:49:03Z")

</div>

It is a security CSV export from IronPort; a software, and i can't change anything

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 5, 2018, 2:57pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/6 "2018-04-05T14:57:31Z")

</div>

I did not mean exporting to CSV but how did you import the CSV file into elasticsearch?

---

<div class="post-metadata">

**Author:** ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)\
**Post date:** [April 5, 2018, 9:34pm UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/7 "2018-04-05T21:34:01Z")

</div>

sorry I had misread,

using logstash and filebeat:

- I put filebeat listening on the directory where I send my CSV.
- I get input {beats =\> "5044" } in my logstash pipeline  
🙂

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 6, 2018, 7:38am UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/8 "2018-04-06T07:38:22Z")

</div>

I think you need to configure an input Codec: [https://www.elastic.co/guide/en/logstash/6.2/plugins-codecs-line.html](https://www.elastic.co/guide/en/logstash/6.2/plugins-codecs-line.html)

And define the right `charset`.

I moved the question to #logstash as I feel it's where everything should be solved.

---

<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 4, 2018, 7:38am UTC](https://discuss.elastic.co/t/how-to-rename-elasticsearch-columns/126930/9 "2018-05-04T07:38:36Z")

</div>

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