OpenSearch Ppl

OpenSearch Ppl

Certified

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.

yaml
type: io.kestra.plugin.opensearch.Ppl

Filter and aggregate with PPL.

yaml
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

Configure OpenSearch connection

Hosts, auth headers, and TLS options reused by every task invocation.

Definitions
hosts*Requiredarray
SubTypestring

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.

basicAuth

Basic auth configuration

passwordstring

Basic auth password

usernamestring

Basic auth username

headersarray
SubTypestring

Additional HTTP headers

Each entry is Key: Value, e.g. Authorization: Token XYZ; rendered per request.

pathPrefixstring

Path prefix for every request

Prepends /my/path to all endpoints when OpenSearch is behind a proxy enforcing a base path; leave unset otherwise.

strictDeprecationModebooleanstring

Fail on warning headers

If true, any response containing an OpenSearch warning header is treated as a failure; defaults to server/client behavior.

trustAllSslbooleanstring

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.

PPL query string

PPL statement rendered at runtime.

Maximum number of rows to return

Sent as fetch_size in the request body. The cluster decides the effective cap.

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Result 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.

DefaultJDBC
Possible Values
JDBCCSVRAW

Response format

Sent as the format query-string parameter. Defaults to JDBC. CSV and RAW return text payloads.

Reference (ref) of the pluginDefaults to apply to this task.

Shard routing key

Hashes routing using this value instead of the document id to colocate related records.

First row

Set when fetchType is FETCH_ONE and format is JDBC. Contains the first row only.

SubTypeobject

Fetched rows

Set when fetchType is FETCH and format is JDBC. Contains all rows from the response.

Returned row count

Number of rows included in outputs for the selected fetchType.

Raw text payload

Set when format is CSV or RAW and fetchType is FETCH or FETCH_ONE. Full response body as text.

Total rows reported

Total rows returned by the PPL response envelope.

Formaturi

Stored data URI

Set when fetchType is STORE. Kestra internal storage path. Ion file for JDBC, text file for CSV and RAW.

Unitrecords

Number of records returned

Number of PPL requests sent