
OpenSearch Ppl
CertifiedRun an OpenSearch PPL query
OpenSearch Ppl
Run an OpenSearch PPL query
Runs a Piped Processing Language query against the OpenSearch _plugins/_ppl endpoint.
PPL is OpenSearch's counterpart to Elasticsearch ES|QL. The two are not interchangeable. A query written for one engine will not run on the other, so dashboards that aggregate across both engines need engine-specific queries.
Requires the optional opensearch-sql plugin on the cluster. The task fails if the plugin is missing.
type: io.kestra.plugin.opensearch.PplExamples
Filter and aggregate with PPL.
id: opensearch_ppl
namespace: company.team
tasks:
- id: ppl_query
type: io.kestra.plugin.opensearch.Ppl
connection:
hosts:
- "http://localhost:9200"
query: "source=accounts | where age > 30 | stats count() by gender"
fetchType: FETCH
Properties
connection *RequiredNon-dynamic
Configure OpenSearch connection
Hosts, auth headers, and TLS options reused by every task invocation.
io.kestra.plugin.opensearch.OpensearchConnection
OpenSearch HTTP endpoints
One or more host URLs with scheme and port, e.g. https://opensearch.com: 9200; all are used for load-balancing/failover.
Basic auth configuration
io.kestra.plugin.opensearch.OpensearchConnection-BasicAuth
Basic auth password
Basic auth username
Additional HTTP headers
Each entry is Key: Value, e.g. Authorization: Token XYZ; rendered per request.
Path prefix for every request
Prepends /my/path to all endpoints when OpenSearch is behind a proxy enforcing a base path; leave unset otherwise.
Fail on warning headers
If true, any response containing an OpenSearch warning header is treated as a failure; defaults to server/client behavior.
Trust all SSL certificates
INSECURE — disables TLS certificate and hostname verification entirely, allowing man-in-the-middle attacks. Must never be used against production clusters or over untrusted networks. Prefer supplying a trusted CA certificate/trust store instead.
query *Requiredstring
PPL query string
PPL statement rendered at runtime.
fetchSize integerstring
Maximum number of rows to return
Sent as fetch_size in the request body. The cluster decides the effective cap.
fetchType string
FETCHSTOREFETCHFETCH_ONENONEResult handling mode
Controls how query results are exposed. FETCH returns all rows. FETCH_ONE returns the first row (JDBC format only). STORE writes results to Kestra internal storage and returns a URI. NONE produces no output. For CSV and RAW formats, FETCH and FETCH_ONE return the full text payload in the text output; STORE saves it as a file.
format string
JDBCJDBCCSVRAWResponse format
Sent as the format query-string parameter. Defaults to JDBC. CSV and RAW return text payloads.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
routing string
Shard routing key
Hashes routing using this value instead of the document id to colocate related records.
Outputs
row object
First row
Set when fetchType is FETCH_ONE and format is JDBC. Contains the first row only.
rows array
Fetched rows
Set when fetchType is FETCH and format is JDBC. Contains all rows from the response.
size integer
Returned row count
Number of rows included in outputs for the selected fetchType.
text string
Raw text payload
Set when format is CSV or RAW and fetchType is FETCH or FETCH_ONE. Full response body as text.
total integer
Total rows reported
Total rows returned by the PPL response envelope.
uri string
uriStored data URI
Set when fetchType is STORE. Kestra internal storage path. Ion file for JDBC, text file for CSV and RAW.
Metrics
records counter
recordsNumber of records returned
requests.count counter
Number of PPL requests sent