Skip to content
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

[ES|QL] AUTO_BUCKET should accept date fields #102756

Closed
not-napoleon opened this issue Nov 29, 2023 · 3 comments · Fixed by #104547
Closed

[ES|QL] AUTO_BUCKET should accept date fields #102756

not-napoleon opened this issue Nov 29, 2023 · 3 comments · Fixed by #104547
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@not-napoleon
Copy link
Member

Description

Currently, AUTO_BUCKET requires you to format your dates to strings, but that's counter intuitive. It should just accept the date directly.

This should work:

| eval bucket_start = (now()- 1 day)
| eval bucket_end = (now())
| eval bucket = auto_bucket(@timestamp, 24, bucket_start, bucket_end)

Currently we need to use something like

| eval bucket_start = date_format((now()- 1 day))
| eval bucket_end = date_format((now()))
| eval bucket = auto_bucket(@timestamp, 24, bucket_start, bucket_end)
@elasticsearchmachine elasticsearchmachine added the Team:QL (Deprecated) Meta label for query languages team label Nov 29, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)

@wchaparro wchaparro added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 2, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants