# Is there a way for Elasticsearch to initiate a spark job?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-for-elasticsearch-to-initiate-a-spark-job/180714>\
**Category:** Elasticsearch\
**Created:** [May 12, 2019, 6:06pm UTC](https://discuss.elastic.co/t/is-there-a-way-for-elasticsearch-to-initiate-a-spark-job/180714 "2019-05-12T18:06:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NadavKal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nadavkal/32/70971_2.png) [@NadavKal](https://discuss.elastic.co/u/NadavKal)\
**Post date:** [May 12, 2019, 6:06pm UTC](https://discuss.elastic.co/t/is-there-a-way-for-elasticsearch-to-initiate-a-spark-job/180714/1 "2019-05-12T18:06:59Z")

</div>

i'm looking for a way for elastic to generate a spark job which will perform aggregations and write them back to elasticsearch and for them to be available for kibana to display.

we're using kibana as a BI platform for our data, but it's getting too massive.  
we can increase the compute (by a lot) but the costs will be very high.

so i'm looking for a way to keep the raw data on S3 and for it to be aggregated with a job invoked by elastisearch on demand. then, the results will be written to elasticsearch and displayed in kibana.

is that possible?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 12, 2019, 8:01pm UTC](https://discuss.elastic.co/t/is-there-a-way-for-elasticsearch-to-initiate-a-spark-job/180714/2 "2019-05-12T20:01:16Z")

</div>

I suspect you would need to orchestrate such a scheme outside Elasticsearch.

---

<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:** [June 9, 2019, 8:01pm UTC](https://discuss.elastic.co/t/is-there-a-way-for-elasticsearch-to-initiate-a-spark-job/180714/3 "2019-06-09T20:01:21Z")

</div>

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