# Elasticsearch to SQL

**URL:** https://discuss.elastic.co/t/elasticsearch-to-sql/191853
**Category:** Logstash
**Created:** [July 23, 2019, 3:07pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853 "2019-07-23T15:07:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mroldao](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mroldao](https://discuss.elastic.co/u/mroldao)
#### Post date: [July 23, 2019, 3:07pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/1 "2019-07-23T15:07:25Z")

</div>

Hi,

Im new in Elasticsearch.  
I have a project to collect syslogs from some servers using custom grok filter.  
I can write different logs to different indexes and works fine.  
Kibana reporting is a great tool, but my goal is to use SQL for PowerBI as reporting.  
My main issue is that using REST API only get 10000 rows.  
Is that possible to use another DB engine with Lucene like MariaDB and export some data from ELK to MariaDB in the same server?  
How i do that? Off course without the limit of rows, because at this time i have some issues with limit rows, i want all data from one day.

Some help.

Regards,  
Marcos

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 23, 2019, 3:27pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/2 "2019-07-23T15:27:13Z")

</div>

> [@mroldao](#):
>
> Is that possible to use another DB engine with Lucene like MariaDB and export some data from ELK to MariaDB in the same server?

I have not tested it but I believe this could be done. Use an [elasticsearch](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-elasticsearch.html) input. Then either use a third-party [jdbc output](https://github.com/theangryangel/logstash-output-jdbc) or use a [jdbc\_streaming](https://www.elastic.co/guide/en/logstash/current/plugins-filters-jdbc_streaming.html) filter to execute INSERTs (in which case you do not need an output).

---

<div class="post-metadata">

### Author: ![mroldao](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mroldao](https://discuss.elastic.co/u/mroldao)
#### Post date: [July 23, 2019, 3:38pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/3 "2019-07-23T15:38:59Z")

</div>

Hi Badger,

Thanks for your reply.  
At this moment i use logstash as output.  
What i need is that the output become logstash and MariaDB Database.  
I try to use jdbc output without success, as you said use the jdbc streaming to execute inserts into MariaDB? Is that correct?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 23, 2019, 3:54pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/4 "2019-07-23T15:54:56Z")

</div>

> [@mroldao](#):
>
> use the jdbc streaming to execute inserts into MariaDB? Is that correct?

As I said, I have not tried it, but I think that would work.

---

<div class="post-metadata">

### Author: ![mroldao](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mroldao](https://discuss.elastic.co/u/mroldao)
#### Post date: [July 23, 2019, 4:16pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/5 "2019-07-23T16:16:54Z")

</div>

Ok.  
I will try this.  
Thank you.

---

<div class="post-metadata">

### Author: ![mroldao](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mroldao](https://discuss.elastic.co/u/mroldao)
#### Post date: [July 24, 2019, 1:33pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/6 "2019-07-24T13:33:25Z")

</div>

Hi Badger,

It works with jdbc output plugin.  
Another question the records appears in Kibana second by second, is it possible to change de save time between 5 by 5 minutes?  
Because if i saved all records second by second de database increases very shortly.  
Is that a definition in elasticsearch?

Thank you.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 24, 2019, 2:18pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/7 "2019-07-24T14:18:13Z")

</div>

> [@mroldao](#):
>
> Another question the records appears in Kibana second by second, is it possible to change de save time between 5 by 5 minutes?

I cannot think of a way to do that.

---

<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: [August 21, 2019, 2:18pm UTC](https://discuss.elastic.co/t/elasticsearch-to-sql/191853/8 "2019-08-21T14:18:16Z")

</div>

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