# How to do a select on every objects in Elasticsearch

**URL:** https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106
**Category:** Elasticsearch
**Tags:** elastic-stack-sql
**Created:** [June 4, 2019, 7:44am UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106 "2019-06-04T07:44:27Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)
#### Post date: [June 4, 2019, 7:44am UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/1 "2019-06-04T07:44:27Z")

</div>

Hi all

I'm exploring the ES SQL and I need more information. I only read the getting start on the documentation about SQL.

Is it possible to do a select on logstash or other index present in elastic?

I read examples on flights, but I don't understand where I could find the information about this table in the index pattern.

Thank you  
Franco

---

<div class="post-metadata">

### Author: ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)
#### Post date: [June 4, 2019, 5:54pm UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/2 "2019-06-04T17:54:16Z")

</div>

Hi @franco.federico,

It's not entirely clear for me what you are looking for.  
If I got your question right, you can find more information about tables using [SHOW TABLES](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-syntax-show-tables.html) command or [DESCRIBE TABLE](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-syntax-describe-table.html).

Also, you can use a [pattern](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-syntax-select.html#sql-syntax-from) if you want to query multiple tables.

---

<div class="post-metadata">

### Author: ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)
#### Post date: [June 4, 2019, 8:17pm UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/3 "2019-06-04T20:17:56Z")

</div>

If I want to do an ES SQL query on logstash index, what is the name of the table or the schema that implement logstash index?

And if I want to do an ES SQL query on other index what is the name of the table or the schema that show that implement a generic index?

Thank you  
Franco

---

<div class="post-metadata">

### Author: ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)
#### Post date: [June 5, 2019, 8:41am UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/4 "2019-06-05T08:41:25Z")

</div>

I am on the [demo.elastic.com](http://demo.elastic.com)  
I see filebeat index.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b6d6cdd0b35ad54f18a1409a2089e0d786b3f030.png)

Now I'm trying to do a describe of filebeat in the dev tool and I have no response

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/9/295df6d7d1511bcf6645d0a38cf82937cde91663.png)

Why?

I try with other index but I have the same result. Only for flights it's done.

Thank you  
Franco

---

<div class="post-metadata">

### Author: ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)
#### Post date: [June 5, 2019, 10:13am UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/5 "2019-06-05T10:13:47Z")

</div>

I'm reading in the documentation that the table is the index.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/0/207aa5fc14e4d3a70cc0f29d9693200f5c3cac09.png)

In this case it doen't work? Why? I tried to my system with the X Pack active on the versione 6.7 but I have the same problem.

Is there other configuration to do?

Thank you  
Franco

---

<div class="post-metadata">

### Author: ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)
#### Post date: [June 6, 2019, 10:14am UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/6 "2019-06-06T10:14:38Z")

</div>

Because `filebeat` is not a table/index. By default, Filebeat writes events to multiple indices (daily) named `filebeat-[Filebeat_version]-yyyy.MM.dd`, where `yyyy.MM.dd` is the date when the events were indexed.

In [demo.elastic.co](http://demo.elastic.co), you should use

```auto
POST _sql?pretty&format=txt
{
  "query":"SHOW TABLES LIKE 'filebeat%'"
}

```

to see the list of filebeat indices and then have a look at one of them with `DESCRIBE` sql command. For example:

```auto
POST _sql?pretty&format=txt
{
  "query":"DESCRIBE \"filebeat-7.0.0-2019.05.07-000050\""
}

```

---

<div class="post-metadata">

### Author: ![franco.federico](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@franco.federico](https://discuss.elastic.co/u/franco.federico)
#### Post date: [June 6, 2019, 5:01pm UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/7 "2019-06-06T17:01:52Z")

</div>

Thank you for information @Andrei_Stefan.

I suggest to add this example in the documentation because a basic user when found the SQL the first step is to try to exist index.

Bye  
Franco

---

<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: [July 4, 2019, 5:01pm UTC](https://discuss.elastic.co/t/how-to-do-a-select-on-every-objects-in-elasticsearch/184106/8 "2019-07-04T17:01:55Z")

</div>

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