Skip to content

ES|QL sample documentation #129350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2025
Merged

Conversation

jan-elastic
Copy link
Contributor

No description provided.

@jan-elastic jan-elastic added >non-issue :ml Machine learning Team:ML Meta label for the ML team v9.1.0 labels Jun 12, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@jan-elastic jan-elastic force-pushed the esql-sample-docs branch 3 times, most recently from 0edaacb to 83899fd Compare June 13, 2025 06:31
Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but let's double check the tech preview markers - I think one is missing, see below.

Comment on lines +234 to +238
// Hardcode the sample values to work around the limitations of the CSV tests in the
// presence of randomness, and be able to specify an expected result for the docs.
| STATS emp_no = COUNT()
| EVAL emp_no = [10018, 10024, 10062, 10081]
| MV_EXPAND emp_no
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, this is beautiful. But I like that we're making sure the syntax is valid, even though the output is not related to the query that's in the docs!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know. Within the system's current limitations, I don't see anything better than this...

## `SAMPLE` [esql-sample]

```yaml {applies_to}
stack: preview 9.1
Copy link
Contributor

@leemthompo leemthompo Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex-spies this is the correct way of marking versioning/lifecycle (preview/beta/GA) in the new docs

We haven't consolidated all the existing pages yet, (see #128576) but we should start using this on a go-forward basis

The docs build will render the preview pill and there will be more explicit tooltips soon too :)

Copy link
Contributor

@leemthompo leemthompo Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's much nicer because we're using structured metadata that doesn't require as much manual maintenance, because the docs build handles the output

Say this goes GA in 9.3, all we have to do is append a comma-separated version and the docs will be up-to-date and version-aware on the page without having to switch versions using different URLs:

eg

stack: preview 9.1, ga 9.3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is great. Thanks for the explanation!

@jan-elastic jan-elastic merged commit df76c15 into elastic:main Jun 17, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning >non-issue Team:ML Meta label for the ML team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants