kibana/packages/kbn-esql-utils
Stratoula Kalafateli 788e9b34dd
[ES|QL] Initialize with time named params for dataviews without @timestamp (#189367)
## Summary

Closes https://github.com/elastic/kibana/issues/189032

For indices with no @timestamp, when the users are transitioning from
the dataview mode to the ES|QL mode then we are defaulting to
```
from dataviewIndex | where dataviewTimefield <= ?end and dataviewTimefield >= ?start
```

![meow](https://github.com/user-attachments/assets/d55e17d1-d867-400a-b6eb-b7cf7047d070)

which will :
1. Train the users for the named params
2. Enable the histogram
3. Enable the datepicker

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2024-08-01 17:39:46 +02:00
..
src [ES|QL] Initialize with time named params for dataviews without @timestamp (#189367) 2024-08-01 17:39:46 +02:00
constants.ts [ES|QL] Remove version from _query requests (#184289) 2024-05-29 10:48:31 +02:00
index.ts [ES|QL] Improves the authoring of the query and charts (#186875) 2024-07-30 10:53:01 +02:00
jest.config.js [ES|QL] Use same adhoc dataviews for queries with the same index pattern (#174736) 2024-01-31 19:56:24 +02:00
kibana.jsonc Move esql code to the new kibana-esql team (#179454) 2024-03-27 07:47:08 +01:00
package.json [ES|QL] Use same adhoc dataviews for queries with the same index pattern (#174736) 2024-01-31 19:56:24 +02:00
README.md [ES|QL] [Discover] Creating where clause filters from the table, sidebar and table row viewer (#181399) 2024-05-06 15:44:19 +02:00
tsconfig.json [ES|QL] Enabling the timepicker for indices without the @timestamp field (#184361) 2024-07-17 16:23:16 -07:00

@kbn/esql-utils

This package contains utilities for ES|QL.

  • getESQLAdHocDataview: Use this function to get correctly an adHoc dataview for your query.
  • getIndexPatternFromESQLQuery: Use this to retrieve the index pattern from the from command.
  • getLimitFromESQLQuery: Use this function to get the limit for a given query. The limit can be either set from the limit command or can be a default value set in ES.
  • removeDropCommandsFromESQLQuery: Use this function to remove all the occurences of the drop command from the query.
  • appendToESQLQuery: Use this function to append more pipes in an existing ES|QL query. It adds the additional commands in a new line.
  • appendWhereClauseToESQLQuery: Use this function to append where clause in an existing query.