# How to dump streaming aggregate data to elastic search

**URL:** <https://discuss.elastic.co/t/how-to-dump-streaming-aggregate-data-to-elastic-search/148621>\
**Category:** Elasticsearch\
**Created:** [September 14, 2018, 12:58pm UTC](https://discuss.elastic.co/t/how-to-dump-streaming-aggregate-data-to-elastic-search/148621 "2018-09-14T12:58:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheryl](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sheryl](https://discuss.elastic.co/u/sheryl)\
**Post date:** [September 14, 2018, 12:58pm UTC](https://discuss.elastic.co/t/how-to-dump-streaming-aggregate-data-to-elastic-search/148621/1 "2018-09-14T12:58:11Z")

</div>

i have streaming data coming from kafka , and using spark structured streaming i do some filteration .

> val df=streamingData.selectExpr("\*").groupBy("date","location","name").agg((count(("name"))

I want to send streaming data to elasticsearch. how can i dump this aggregated data to Elasticsearch. i have used output mode complete and update too.  
without aggregation my streaming data is dumping to Elasticsearch with output mode append.it works fine .  
but i want to send the aggregated data of streaming batch to 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:** [October 12, 2018, 12:58pm UTC](https://discuss.elastic.co/t/how-to-dump-streaming-aggregate-data-to-elastic-search/148621/2 "2018-10-12T12:58:16Z")

</div>

Closed on October 12, 2018, 12:58pm UTC

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