# Export Specific Column From MT

**URL:** <https://discuss.hail.is/t/export-specific-column-from-mt/1479>\
**Category:** Hail Query & hailctl\
**Created:** [June 23, 2020, 4:43pm UTC](https://discuss.hail.is/t/export-specific-column-from-mt/1479 "2020-06-23T16:43:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haseeb1](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Haseeb1](https://discuss.hail.is/u/Haseeb1)\
**Post date:** [June 23, 2020, 4:43pm UTC](https://discuss.hail.is/t/export-specific-column-from-mt/1479/1 "2020-06-23T16:43:05Z")

</div>

I have a MT with VEP and Variant\_qc applied, i just wanted to export some of the columns as a tsv file for example only the gene\_symbol and AF. How to do it.

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [June 23, 2020, 9:49pm UTC](https://discuss.hail.is/t/export-specific-column-from-mt/1479/2 "2020-06-23T21:49:33Z")

</div>

Hi @Haseeb1  
You’re looking for [`Table.export`](https://hail.is/docs/0.2/hail.Table.html#hail.Table.export):

```auto
t.key_by().select('gene_symbol', 'AF').export('/path/to/file.tsv')

```

---

<div class="post-metadata">

**Author:** ![Haseeb1](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Haseeb1](https://discuss.hail.is/u/Haseeb1)\
**Post date:** [June 24, 2020, 2:00pm UTC](https://discuss.hail.is/t/export-specific-column-from-mt/1479/3 "2020-06-24T14:00:41Z")

</div>

How to convert mt to table?

---

<div class="post-metadata">

**Author:** ![johnc1231](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/johnc1231/32/286_2.png) [@johnc1231](https://discuss.hail.is/u/johnc1231)\
**Post date:** [June 24, 2020, 2:06pm UTC](https://discuss.hail.is/t/export-specific-column-from-mt/1479/4 "2020-06-24T14:06:44Z")

</div>

It sounds like you just want to export row fields. In which case, you can do `mt.rows()` to get a table of just the row fields.

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [June 24, 2020, 2:39pm UTC](https://discuss.hail.is/t/export-specific-column-from-mt/1479/5 "2020-06-24T14:39:38Z")

</div>

2 posts were split to a new topic: [I tried to select some nested fields but I received a LookupError](https://discuss.hail.is/t/i-tried-to-select-some-nested-fields-but-i-received-a-lookuperror/1487)
