Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions explore-analyze/discover/try-esql.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ Variable controls help you make your queries more dynamic instead of having to m

You can add them from your Discover {{esql}} query.

:::{note}
:applies_to: {"stack": "ga 9.5", "serverless": "ga"}
When you generate a [CSV report](/explore-analyze/report-and-share.md#csv-limitations) from a Discover session or a Discover session panel on a dashboard, the exported data reflects the values currently selected in the variable controls. This applies to both immediate and scheduled reports.
:::

:::{include} ../_snippets/variable-control-procedure.md
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ The listing of reports in **Stack Management > Reporting** allows you to inspect
:::


## ES|QL variable control errors [reporting-troubleshooting-csv-esql-variables]

Generating a CSV report from an {{esql}} query that references a [variable control](/explore-analyze/discover/try-esql.md#add-variable-control), such as `?crew_id`, can fail with an error like:

```txt
parsing_exception: Unknown query parameter [crew_id]
```

This occurs on versions where the reporting task didn't pass the selected control values through to the query. It was resolved in 9.5.0 and backported to the 8.19, 9.3.9, and 9.4.4 patch releases, so that reports now run with the values currently selected in the controls.

To work around the error on an earlier version, upgrade to a version that includes the fix, or replace the variable references in the query with fixed values before you export.


## Token expiration [reporting-troubleshooting-csv-token-expired]

A relatively common type of error seen for CSV exports is: `security_exception Root causes: security_exception: token expired`.
Expand Down
Loading