Esql
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-dynamic
Definitions
io.kestra.plugin.elasticsearch.ElasticsearchConnection
hosts*Requiredarray
SubTypestring
Min items
1basicAuth
io.kestra.plugin.elasticsearch.ElasticsearchConnection-BasicAuth
passwordstring
usernamestring
headersarray
SubTypestring
pathPrefixstring
strictDeprecationModebooleanstring
trustAllSslbooleanstring
query *Requiredstring
fetchType string
Default
FETCHPossible Values
STOREFETCHFETCH_ONENONEfilter object
routing string
Outputs
row object
rows array
SubTypeobject
size integer
total integer
uri string
Format
uriMetrics
records counter
Unit
records