Esql
yaml
type: "io.kestra.plugin.elasticsearch.esql"
Examples
yaml
id: bulk_load_and_query
namespace: company.team
tasks:
- id: extract
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/resolve/main/jsonl/books.jsonl
- id: load
type: io.kestra.plugin.elasticsearch.Bulk
from: "{{ outputs.extract.uri }}"
- id: sleep
type: io.kestra.plugin.core.flow.Sleep
duration: PT5S
description: Pause needed after load before we can query
- id: query
type: io.kestra.plugin.elasticsearch.Esql
fetchType: STORE
query: |
FROM books
| KEEP author, name, page_count, release_date
| SORT page_count DESC
| LIMIT 5
pluginDefaults:
- type: io.kestra.plugin.elasticsearch
values:
connection:
headers:
- "Authorization: ApiKey yourEncodedApiKey"
hosts:
- https://yourCluster.us-central1.gcp.cloud.es.io:443
Properties
connection *RequiredNon-dynamicElasticsearchConnection
query *Requiredstring
fetchType string
Default
FETCH
Possible Values
STORE
FETCH
FETCH_ONE
NONE
filter object
routing string
Outputs
row object
rows array
SubType object
size integer
total integer
uri string
Format
uri
Definitions
io.kestra.plugin.elasticsearch.ElasticsearchConnection
hosts *Requiredarray
SubType string
Min items
1
basicAuth ElasticsearchConnection-BasicAuth
headers array
SubType string