﻿---
title: stack es esql async-query-get cli command
description: Get async ES|QL query results. Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4116/reference/elastic-cli/cli/stack/es/esql/async-query-get
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack es esql async-query-get cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack es esql async-query-get --id <id> [options]
```

Get async ES|QL query results.
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--id string required">
    The unique identifier of the query.
    A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.
    A query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.
  </definition>
  <definition term="--drop-null-columns">
    Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
    If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
  </definition>
  <definition term="--format enum">
    A short version of the Accept header, for example `json` or `yaml`.
    **Values:** csv, json, tsv, txt, yaml, cbor, smile, arrow
  </definition>
  <definition term="--keep-alive string">
    The period for which the query and its results are stored in the cluster.
    When this period expires, the query and its results are deleted, even if the query is still ongoing.
  </definition>
  <definition term="--wait-for-completion-timeout string">
    The period to wait for the request to finish.
    By default, the request waits for complete query results.
    If the request completes during the period specified in this parameter, complete query results are returned.
    Otherwise, the response returns an `is_running` value of `true` and no results.
  </definition>
  <definition term="--error-trace">
    When set to `true` Elasticsearch will include the full stack trace of errors
    when they occur.
  </definition>
  <definition term="--filter-path string">
    Comma-separated list of filters in dot notation which reduce the response
    returned by Elasticsearch.
    **Repeatable:** pass `--filter-path` multiple times to supply more than one value
  </definition>
  <definition term="--human">
    When set to `true` will return statistics in a format suitable for humans.
    For example `"exists_time": "1h"` for humans and
    `"exists_time_in_millis": 3600000` for computers. When disabled the human
    readable values will be omitted. This makes sense for responses being consumed
    only by machines.
  </definition>
  <definition term="--pretty">
    If set to `true` the returned JSON will be "pretty-formatted". Only use
    this option for debugging only.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>