# A kind of transposition - is it possible

**URL:** <https://discuss.elastic.co/t/a-kind-of-transposition-is-it-possible/243921>\
**Category:** Elasticsearch\
**Created:** [August 5, 2020, 7:40pm UTC](https://discuss.elastic.co/t/a-kind-of-transposition-is-it-possible/243921 "2020-08-05T19:40:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raster/32/47522_2.png) [@Raster](https://discuss.elastic.co/u/Raster)\
**Post date:** [August 5, 2020, 7:40pm UTC](https://discuss.elastic.co/t/a-kind-of-transposition-is-it-possible/243921/1 "2020-08-05T19:40:54Z")

</div>

Hi,  
Let's say I have data in a table with columnames of key, col1, col2, col3. Note name of first column is key in this example- could be anything. Can I have this data converted into a table having these columns - key, colname, colvalue.

Example  
Original data:  
Key, col1, col2, col3  
1,a,b,c  
2,p,q,r

Should become  
Key, colname,colvalue  
1,col1,a  
1,col2,b  
1,col3,c  
2,col1,p  
2,col2,q  
3,col3,r

Is this kind of a Transposition possible?  
R

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 9, 2020, 11:14pm UTC](https://discuss.elastic.co/t/a-kind-of-transposition-is-it-possible/243921/2 "2020-08-09T23:14:02Z")

</div>

Is this data that is already in Elasticsearch? If so look at [https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html)

---

<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:** [September 6, 2020, 11:14pm UTC](https://discuss.elastic.co/t/a-kind-of-transposition-is-it-possible/243921/3 "2020-09-06T23:14:10Z")

</div>

Closed on September 6, 2020, 11:14pm UTC

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