stack es sql query cli command
Auth required
elastic stack es sql query [options]
Get SQL search results.
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--formatenum-
The format for the response. You can also specify a format using the
AcceptHTTP header. If you specify both this parameter and theAcceptHTTP header, this parameter takes precedence.Values: csv, json, tsv, txt, yaml, cbor, smile
--[no-]allow-partial-search-results- If
true, the response has partial results when there are shard request timeouts or shard failures. Iffalse, the API returns an error with no partial results. --catalogstring- The default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.
--[no-]columnar- If
true, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results. The API supports this parameter only for CBOR, JSON, SMILE, and YAML responses. --cursorstring- The cursor used to retrieve a set of paginated results.
If you specify a cursor, the API only uses the
columnarandtime_zonerequest body parameters. It ignores other request body parameters. --fetch-sizenumber- The maximum number of rows (or entries) to return in one response.
--[no-]field-multi-value-leniency- If
false, the API returns an exception when encountering multiple values for a field. Iftrue, the API is lenient and returns the first value from the array with no guarantee of consistent results. --filterstring- The Elasticsearch query DSL for additional filtering.
--[no-]index-using-frozen- If
true, the search can run on frozen indices. --keep-alivestring- The retention period for an async or saved synchronous search.
--[no-]keep-on-completion- If
true, Elasticsearch stores synchronous searches if you also specify thewait_for_completion_timeoutparameter. Iffalse, Elasticsearch only stores async searches that don't finish before thewait_for_completion_timeout. --page-timeoutstring- The minimum retention period for the scroll cursor.
After this time period, a pagination request might fail because the scroll cursor is no longer available.
Subsequent scroll requests prolong the lifetime of the scroll cursor by the duration of
page_timeoutin the scroll request. --paramsstring[]- The values for parameters in the query.
--querystring- The SQL query to run.
--request-timeoutstring- The timeout before the request fails.
--runtime-mappingsstring- One or more runtime fields for the search request. These fields take precedence over mapped fields with the same name.
--time-zonestring- The ISO-8601 time zone ID for the search.
--wait-for-completion-timeoutstring- The period to wait for complete results.
It defaults to no timeout, meaning the request waits for complete search results.
If the search doesn't finish within this period, the search becomes async. To save a synchronous search, you must specify this parameter and the
keep_on_completionparameter. --[no-]error-trace- When set to
trueElasticsearch will include the full stack trace of errors when they occur. --filter-pathstring-
Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.
Repeatable: pass
--filter-pathmultiple times to supply more than one value --[no-]human- When set to
truewill return statistics in a format suitable for humans. For example"exists_time": "1h"for humans and"exists_time_in_millis": 3600000for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. --[no-]pretty- If set to
truethe returned JSON will be "pretty-formatted". Only use this option for debugging only. --input-filestring- path to a JSON file to use as command input
--[no-]dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--[no-]json-
output as JSON