# Write to hdfs from elasticsearch

**URL:** https://discuss.elastic.co/t/write-to-hdfs-from-elasticsearch/71238
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [January 11, 2017, 3:22pm UTC](https://discuss.elastic.co/t/write-to-hdfs-from-elasticsearch/71238 "2017-01-11T15:22:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sbone](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@sbone](https://discuss.elastic.co/u/sbone)
#### Post date: [January 11, 2017, 3:22pm UTC](https://discuss.elastic.co/t/write-to-hdfs-from-elasticsearch/71238/1 "2017-01-11T15:22:39Z")

</div>

Is it possible to write from elasticsearch to hdfs?

the current pipeline is:  
fluentd -\> elasticsearch  
fluentd -\> flume -\> hdfs

elastic is used for realtime analysis and hive (on top of hdfs) is used for longer.

i would like to replace this setup with:  
fluentd -\> elasticsearch -\> hdfs

but i have not been able to confirm whether this is possible/feasible.

do anyone have experience with this, or can point me to the docs?

thx.

---

<div class="post-metadata">

### Author: ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)
#### Post date: [January 16, 2017, 10:20pm UTC](https://discuss.elastic.co/t/write-to-hdfs-from-elasticsearch/71238/2 "2017-01-16T22:20:53Z")

</div>

If you want to extract data from Elasticsearch into a file format on HDFS you can use any of the provided mechanisms in the ES-Hadoop package to target the Elasticsearch indices you want to export and target HDFS as the desired output location.

You can realize this in a variety of ways, one of which includes creating an external Hive table (backed by ES) and a new Hive table (backed by HDFS) and doing an `INSERT ... SELECT` statement to transfer the data.

For more information on ES-Hadoop, you can take a look at the documentation pages [here](https://www.elastic.co/guide/en/elasticsearch/hadoop/current/index.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: [February 13, 2017, 10:21pm UTC](https://discuss.elastic.co/t/write-to-hdfs-from-elasticsearch/71238/3 "2017-02-13T22:21:06Z")

</div>

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