# How to access data created by Greylog

**URL:** <https://discuss.elastic.co/t/how-to-access-data-created-by-greylog/265786>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [March 1, 2021, 11:16am UTC](https://discuss.elastic.co/t/how-to-access-data-created-by-greylog/265786 "2021-03-01T11:16:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel90/32/77633_2.png) [@daniel90](https://discuss.elastic.co/u/daniel90)\
**Post date:** [March 1, 2021, 11:16am UTC](https://discuss.elastic.co/t/how-to-access-data-created-by-greylog/265786/1 "2021-03-01T11:16:29Z")

</div>

According to

> **[Mapping concepts across SQL and Elasticsearch | Elasticsearch Reference \[7.11\]...](https://www.elastic.co/guide/en/elasticsearch/reference/current/_mapping_concepts_across_sql_and_elasticsearch.html)**

I would do a select statement like this:  
curl -X POST "localhost:9200/\_sql?format=txt&pretty" -H 'Content-Type: application/json' -d'  
{  
"query": "SELECT \* FROM greylog\_10"  
}  
'

But that gives me an error that indicates that this works entirely different. According to the linked documentation i would expect a list of results and not a write attempt to the table/index/frankly i don't know where it tried to write.

According to the linked article the index name should be usable like a table name but that does not seem to be the case. What am i doing wrong?

---

<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:** [March 1, 2021, 11:23am UTC](https://discuss.elastic.co/t/how-to-access-data-created-by-greylog/265786/2 "2021-03-01T11:23:49Z")

</div>

Which version of Elasticsearch are you using?

---

<div class="post-metadata">

**Author:** ![daniel90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel90/32/77633_2.png) [@daniel90](https://discuss.elastic.co/u/daniel90)\
**Post date:** [March 1, 2021, 11:32am UTC](https://discuss.elastic.co/t/how-to-access-data-created-by-greylog/265786/3 "2021-03-01T11:32:42Z")

</div>

Version: 6.8.13

I admit i missed that, but luckily(?) the documentation looks identical regarding this:

> **[Mapping concepts across SQL and Elasticsearch | Elasticsearch Reference \[6.8\]...](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/_mapping_concepts_across_sql_and_elasticsearch.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:** [March 29, 2021, 11:33am UTC](https://discuss.elastic.co/t/how-to-access-data-created-by-greylog/265786/4 "2021-03-29T11:33:17Z")

</div>

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