docs: Vega ES|QL data sources respect the dashboard time range (#7620) - #7678
Draft
florent-leborgne wants to merge 8 commits into
Draft
docs: Vega ES|QL data sources respect the dashboard time range (#7620)#7678florent-leborgne wants to merge 8 commits into
florent-leborgne wants to merge 8 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
Contributor
🔍 Preview links for changed docs |
Contributor
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
…@timestamp Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…annotated samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses #7620 with the following changes to
explore-analyze/visualize/custom-visualizations-with-vega.md(section "Writing {{esql}} queries in Vega"):"%timefield%"table row: simplified to a single version-neutral line ("The timestamp field to use for the dashboard time range") with a link to the new section below.#### Apply the dashboard time range to {{esql}} data sources(sibling H4, matching the page's flat reference structure): uses anapplies-switchwith one tab per behavior, each with an annotated code sample:stack: ga =9.4— the range applies only through?_tstart/?_tend; both the parameters and%timefield%are required.stack: ga 9.5+/serverless: ga— the range applies automatically (as in Lens and Discover);%timefield%is only needed when the time field isn't@timestamp.%context%, and hosts the existing "Event counts over time" worked example (moved here, since it's a time-range example).%context%/%timefield%/the parameters. Also corrected "metric" to "line chart" to match the spec.Time-field resolution (verified against source)
The automatic fallback detects only a field literally named
@timestamp(kibana/src/platform/plugins/shared/esql/server/routes/get_timefield.ts,ES_TIMESTAMP_FIELD_NAME = '@timestamp'+fieldCaps), or the field the query compares against?_tstart/?_tend(parseTimeFieldFromESQLQuery). Indices whose time field has another name (for exampletimestampin the flights sample data) are not auto-filtered unless%timefield%is set. The docs call this out so users don't expect auto-filtering on non-@timestampindices.All claims verified against
esql_query_parser.ts,get_time_field.ts,get_timefield.ts, andquery_parsing_helpers.tsat HEAD (kibana#280070 and its 9.5 backport #280113). Built locally withdocs-builder --strict(passes).Resolves
Closes #7620