# How can I alias column names in a sql query while loading data through logstash?

**URL:** <https://discuss.elastic.co/t/how-can-i-alias-column-names-in-a-sql-query-while-loading-data-through-logstash/95291>\
**Category:** Logstash\
**Created:** [August 1, 2017, 7:30am UTC](https://discuss.elastic.co/t/how-can-i-alias-column-names-in-a-sql-query-while-loading-data-through-logstash/95291 "2017-08-01T07:30:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patil-akshay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patil-akshay/32/15295_2.png) [@patil-akshay](https://discuss.elastic.co/u/patil-akshay)\
**Post date:** [August 1, 2017, 7:30am UTC](https://discuss.elastic.co/t/how-can-i-alias-column-names-in-a-sql-query-while-loading-data-through-logstash/95291/1 "2017-08-01T07:30:19Z")

</div>

I want to change some column name while loading the data through logstash

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [August 1, 2017, 7:31am UTC](https://discuss.elastic.co/t/how-can-i-alias-column-names-in-a-sql-query-while-loading-data-through-logstash/95291/2 "2017-08-01T07:31:23Z")

</div>

Have a look at this: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 2, 2017, 6:33pm UTC](https://discuss.elastic.co/t/how-can-i-alias-column-names-in-a-sql-query-while-loading-data-through-logstash/95291/3 "2017-08-02T18:33:16Z")

</div>

The SELECT part of a SQL query allows you to assign any names to the columns in the result set.

---

<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:** [August 30, 2017, 6:33pm UTC](https://discuss.elastic.co/t/how-can-i-alias-column-names-in-a-sql-query-while-loading-data-through-logstash/95291/4 "2017-08-30T18:33:22Z")

</div>

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