# Export VCF empty output

**URL:** <https://discuss.hail.is/t/export-vcf-empty-output/1319>\
**Category:** Hail Query & hailctl\
**Created:** [March 2, 2020, 4:32pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319 "2020-03-02T16:32:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruchim](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@ruchim](https://discuss.hail.is/u/ruchim)\
**Post date:** [March 2, 2020, 4:32pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/1 "2020-03-02T16:32:07Z")

</div>

Using the export VCF function seems to yield an empty VCF file but the logs look good – any idea why or what to try next?

 ![Screen Shot 2020-03-02 at 9.29.06 AM](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/6beae627dc09263c5744aa48440494b944de0fac.png)

---

<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:** [March 2, 2020, 4:34pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/2 "2020-03-02T16:34:47Z")

</div>

My first guess is that your `touch` command made an empty one, and that the real one is written somewhere else that you don’t expect.

---

<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:** [March 2, 2020, 4:37pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/3 "2020-03-02T16:37:44Z")

</div>

Try doing this again without doing the `touch` first and with a name of a file that doesn’t already exist. It’s possible that hail is just refusing to overwrite a file that already exists and not throwing an error message. If that’s the case, we should change it so it does throw an error message.

---

<div class="post-metadata">

**Author:** ![konradjk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/konradjk/32/12_2.png) [@konradjk](https://discuss.hail.is/u/konradjk)\
**Post date:** [March 2, 2020, 4:39pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/4 "2020-03-02T16:39:21Z")

</div>

My guess here is that it’s actually writing to an HDFS filesystem - is this on Google Cloud?

---

<div class="post-metadata">

**Author:** ![ruchim](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@ruchim](https://discuss.hail.is/u/ruchim)\
**Post date:** [March 3, 2020, 8:23pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/5 "2020-03-03T20:23:57Z")

</div>

@konradjk it is on Google Cloud – whats the best way to export in that case?

@johnc1231 A different failure when I don’t have a touch statement:

 ![Screen Shot 2020-03-03 at 3.22.31 PM](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/ee965dce81613382da49f6555a050c77f01753e2.png)

---

<div class="post-metadata">

**Author:** ![konradjk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/konradjk/32/12_2.png) [@konradjk](https://discuss.hail.is/u/konradjk)\
**Post date:** [March 3, 2020, 8:32pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/6 "2020-03-03T20:32:40Z")

</div>

You’ll see it if you `!hdfs dfs -ls` - since you’re on google cloud, you could also just put it on google cloud storage directly by specifying a `gs://` path like: `hl.export_vcf(mt, 'gs://bucket/path/to/file.vcf.bgz')` - it will (b)gzip it for free if you add that extension so that you can move around less data.

---

<div class="post-metadata">

**Author:** ![ruchim](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@ruchim](https://discuss.hail.is/u/ruchim)\
**Post date:** [March 25, 2020, 7:50pm UTC](https://discuss.hail.is/t/export-vcf-empty-output/1319/7 "2020-03-25T19:50:57Z")

</div>

@konradjk that makes perfect sense – will do thank you!
