Skip to content

Commit 16f9e5e

Browse files
Fixed up the example query in the README
Signed-off-by: Norman Jordan <norman.jordan@improving.com>
1 parent a570e67 commit 16f9e5e

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

docs/docker/integ-test/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ spark.sql("CREATE EXTERNAL TABLE foo (id int, name varchar(100)) location 's3a:/
112112
spark.sql("INSERT INTO foo (id, name) VALUES(1, 'Foo')")
113113
```
114114

115+
## Querying an S3 Table
116+
115117
A REST call to the OpenSearch container can be used to query the table using the Async API.
118+
119+
[Async Query Creation API](https://github.com/opensearch-project/sql/blob/main/docs/user/interfaces/asyncqueryinterface.rst#async-query-creation-api)
116120
```shell
117121
curl \
118122
-u 'admin:C0rrecthorsebatterystaple.' \
@@ -122,14 +126,22 @@ curl \
122126
http://localhost:9200/_plugins/_async_query
123127
```
124128

129+
Sample response:
130+
```json
131+
{
132+
"queryId": "HlbM61kX6MDkAktO",
133+
"sessionId": "1Giy65ZnzNlmsPAm"
134+
}
135+
```
136+
125137
When the query is finished, the results can be retrieved with a REST call to the OpenSearch container.
138+
139+
[Async Query Result API](https://github.com/opensearch-project/sql/blob/main/docs/user/interfaces/asyncqueryinterface.rst#async-query-result-api)
126140
```shell
127141
curl \
128142
-u 'admin:C0rrecthorsebatterystaple.' \
129-
-X POST \
130-
-H 'Content-Type: application/json' \
131-
-d '{}' \
132-
'http://localhost:9200/query_execution_result_mys3/_search?pretty'
143+
-X GET \
144+
'http://localhost:9200/_plugins/_async_query/HlbM61kX6MDkAktO'
133145
```
134146

135147
## Configuration of the Cluster

0 commit comments

Comments
 (0)