When analysts need OpenSearch SQL and PPL instead of the query DSL
Analysts who already think in SQL, or who reason about data as a sequence of transformation steps, often cannot write query DSL JSON efficiently, and a team that needs to answer a question in logs should not have to build a dashboard first. OpenSearch offers SQL and Piped Processing Language (PPL) as alternatives to the query DSL, so the same cluster, indices and security model can serve people who would otherwise depend on a small group of engineers who know the JSON syntax. Both languages are query layers over the same cluster. They do not add a second data store, so the access controls you set for indices and roles still decide what an analyst can read.
PPL processes data step by step, with each command receiving the output of the one before it through the pipe operator. That shape suits exploratory investigation: filter events, group them, compute a count or average, and then sort the result, with each step visible as you add it. SQL suits analysts whose existing tools, reports or habits are built on relational queries. Choose by the work people actually do. A common pattern is to give incident responders PPL for ad hoc investigation and give reporting staff SQL for recurring summaries, then check that both groups can reach the same indices under the roles you have defined. Before you roll either language out, confirm the command and function coverage against the documentation for the exact OpenSearch version you run, because support for particular functions changes between releases.
Treat the query language as a governance decision, not only a usability one. Ask who will run ad hoc queries against production log indices, which fields contain personal or regulated data, and whether those analysts' roles already restrict document-level or field-level access. Test each role with a representative query before go-live, and record which language each group is approved to use. The OpenSearch SQL and PPL documentation is the natural next read for syntax and limits, and the results of your own role tests should be the evidence you keep.
Which language fits which analyst task
SQL suits analysts who already think in tables, joins and aggregations and who want to query OpenSearch without learning a new syntax. Typical uses include reporting queries, ad hoc counts by category, and handing results to tools that expect tabular output. Database administrators, reporting analysts and data engineers usually write these queries, often through the SQL plugin's REST endpoint or a client tool that wraps it. Before rollout, confirm which SQL features your team relies on, because the plugin supports a subset of standard SQL and some constructs behave differently from a relational database. Test large aggregations against production-sized indices, since broad queries can be expensive. In OpenSearch 3.0, the SQL plugin dropped the DSL response format and DELETE support, and pagination defaults to point in time, so review any saved queries or scripts written for earlier versions. Confirm that the Spark connector you use is not the deprecated legacy connector before you build on it.
PPL, the Piped Processing Language, suits investigation of event data such as logs, authentication records and alerts. Each command passes its output to the next through the pipe operator, so an analyst can filter, parse, evaluate and aggregate in readable steps and adjust one step at a time during an investigation. Security analysts, SRE and operations staff typically write these queries in the Query Workbench or Dashboards, and they often share them as the working record of an incident. Before rollout, test the commands your analysts will actually use against your real log fields, including timestamp handling and fields with inconsistent mappings across sources. Check how the team saves and reviews queries, because a PPL pipeline is only useful if others can rerun it. Confirm the command set available in your target version, since PPL coverage changes between releases, and check the result size limits so that a broad search does not return more rows than an analyst can review.
The query DSL is the JSON-based query language that OpenSearch uses natively. It is the right choice for full-featured search, relevance tuning, scoring, highlighting, suggestions, nested documents and application queries that run at user-facing latency. Application engineers and search engineers usually write these queries and keep them in code, where they go through review and version control. Before rollout, benchmark the query at expected concurrency, test relevance with representative documents and measure response time under load. Confirm which query types your application needs, such as multi-match, function score or k-NN, and verify that the SQL and PPL layers do not cover them. Check how the DSL queries will be authorized, since document-level and field-level security apply to all query paths. Treat the DSL as the default for production search features, and reserve SQL and PPL for analysis and investigation where the analyst controls the query.
Most teams end up using all three, and the governance question is which group may use which language on which indices. Platform engineers set the access model first, through roles that control index patterns, document-level security and field masking, so that a PPL or SQL query cannot reveal fields that the DSL path would hide. Security and compliance reviewers should confirm that audit logging captures queries from each language, because an investigation query is still data access. Application owners decide which indices are exposed to application search and which are reserved for analysts. Before rollout, run a pilot in which each group performs its real tasks against a non-production copy, and record what fails. Ask your vendor or internal team to confirm the exact plugin versions and feature availability for your release, because the choice of language often depends on those details.
What changed in the SQL plugin in OpenSearch 3.0
If your analysts or automation query OpenSearch through the SQL plugin, the 3.0 release changed three behaviors you need to plan for before upgrading. The SQL plugin no longer returns results in the query DSL response format, it no longer supports DELETE statements, and pagination now defaults to point in time. The legacy Spark connector is deprecated. Each change can break a saved query, script or dashboard without producing an obvious error in the cluster itself, so the audit belongs in the upgrade plan, not after it.
Start with an inventory. List every place SQL or PPL is called: analyst notebooks, scheduled jobs, alerting definitions, Dashboards visualizations that use SQL, application code and any integration that reads response bodies. For each one, check whether it expects the DSL response shape, issues a DELETE, or pages through results with a method that assumed the previous default. Confirm which of these paths use the Spark connector, because deprecation means a supported path needs to be chosen before that connector is removed in a later release.
Test the inventory against a non-production cluster running 3.0 with representative data and roles. Pay attention to pagination, since a point-in-time default changes how cursors behave and how long search contexts stay open under load. Record the exact result of each query, then decide whether to rewrite it, move the delete logic to the query DSL or an API, or keep a pinned older client during transition. Read the OpenSearch breaking changes documentation for the exact behavior of each change before you write the rewrites, because the details of response shape and error handling matter for downstream parsers.
Query options compared: SQL, PPL and the query DSL
This table compares the three ways to query OpenSearch on audience, pagination, response format, write operations and log exploration fit. Read the version-dependent rows against the release your cluster runs, and treat any row marked for confirmation as a question to settle in your own environment before analysts depend on it.
| Dimension | SQL | PPL | Query DSL |
|---|---|---|---|
| Primary audience | Analysts comfortable with SQL and reporting tools | Analysts who filter, aggregate and reshape events step by step | Developers and engineers building application search and precise queries |
| Pagination method | Point in time is the default in 3.0 and later (confirm the setting on your version) | Confirm the pagination behavior for your version and result sizes | Scroll or point in time, chosen by the application code |
| Response format | Default format is not the DSL response; the DSL response format was removed in 3.0 | Tabular result set designed for piped transformations | Native JSON hits, aggregations and raw response structure |
| Write operations | DELETE support was removed in 3.0; treat SQL as read-only for planning | Read-oriented exploration; confirm any write support on your version | Full index, update and delete operations through the API |
| Log exploration fit | Good for aggregations and familiar joins-style questions on indexed fields | Strong for stepwise filtering, stats and field extraction during investigations | Strong for precise control, scripting and advanced relevance, but verbose for analysts |
| Field and mapping limits | Depends on field types and mappings; confirm which fields are queryable | Depends on field types and mappings; confirm which fields are queryable | Full access to the mapping and index options the cluster exposes |
| Access control | Applies the same Security plugin roles, document and field-level rules (confirm for each path) | Applies the same Security plugin roles, document and field-level rules (confirm for each path) | Applies the same Security plugin roles, document and field-level rules |
| Versions to confirm | 3.0 changes apply from that release onward; check the breaking changes page for your version | Confirm availability and syntax against the docs for your version | Stable across versions, but check response behavior after any upgrade |
How point in time pagination changes large result sets
Since OpenSearch 3.0, pagination through SQL and PPL results defaults to point in time, so each page an analyst requests is read from a frozen view of the index rather than from whatever the index contains at that moment. A point in time is a lightweight context that the cluster keeps open while the cursor is in use. Documents indexed, updated or deleted after it was opened do not shift the rows that appear on later pages, which matters when an investigation or report spans several pages and the underlying logs are still arriving. Before relying on this in a process, confirm in the breaking changes documentation for your exact 3.x release how the default applies to your query path, and whether any client you use still expects the older behavior.
The trade-off is that an open point in time holds resources until it expires or is closed. Each context keeps segment files referenced, so a long-running export or an analyst who walks away from a cursor can keep memory and disk pinned on data nodes while new writes continue. Confirm the default keep-alive duration, the cluster-level limits on open contexts and the behavior when a cursor outlives its context in the version you run, since these values change between releases. Plan for exports to read in bounded batches, close contexts when the job ends, and set alerting on the number of open contexts so a forgotten export does not become a capacity incident. The OpenSearch SQL and PPL documentation is the natural next read for the cursor and pagination settings that apply to your deployment.
How a SQL or PPL request reaches the cluster
The request starts in an analyst's client or the Dashboards query workbench, which sends SQL or PPL text to the cluster. The Security plugin checks the user's roles, index permissions, and any document or field restrictions on every request before it goes further. The SQL plugin on a coordinating node translates the statement into the query DSL, and data nodes run it against their shards. Results return through the plugin, and larger result sets page through with point in time. Confirm that the analyst's role grants read access to every index the query names.
Path of one SQL or PPL request through the security and query layers.
Setting up SQL and PPL access on a self-hosted cluster
This sequence takes an analyst-facing SQL and PPL interface from version check to documented query patterns, with a verification check at each step so the cluster owner can confirm access is controlled before analysts rely on it.
Confirm cluster version and plugin availability
The cluster owner checks the running OpenSearch version against the version you plan to standardize on and confirms that the SQL plugin is installed and loaded on every node. Confirm the plugin's version matches the core version, since a mismatch is a common cause of failed queries. Review the OpenSearch breaking changes documentation for the target version before going further, particularly the 3.0 changes to the SQL plugin. Done when the node plugin listing shows the SQL plugin on each node and the version notes for your target release have been read and filed with the change record.
Enable the SQL and PPL endpoints
The platform team turns on the SQL and PPL query endpoints in the cluster settings, using the configuration keys documented for your release, and applies the change through a controlled configuration process rather than ad hoc API calls. Record the exact settings changed so they can be reproduced in other environments. Done when a simple test statement returns a result from a non-production index and the settings change appears in the configuration history.
Map roles and index permissions in the Security plugin
The security team creates roles that grant SQL and PPL access only to the indices each analyst group needs, and uses document-level and field-level security where sensitive fields must be hidden from some users. Confirm that the role's index permissions cover the query action the SQL plugin uses, and map the roles to identities from your chosen authentication backend. Done when a test user in each group can query permitted indices, receives an access error on restricted indices, and sees masked fields as the role defines.
Test representative queries on non-production data
The analyst lead and platform engineer run a set of representative SQL and PPL queries against a copy or sample of production-shaped data. Include filters, aggregations, joins where supported, and a PPL pipeline that uses several pipe steps, and compare results with the same question asked through the query DSL. Record which queries are slow, which fail on field types, and which return unexpected totals. Done when each representative query has a recorded result, an expected result, and a pass or fail note agreed by both roles.
Check point in time cleanup and result limits
The platform engineer confirms that pagination uses point in time as the default in your release, and that point in time contexts are released when a query finishes or expires, so they do not accumulate on the cluster. Run a paged query to completion, interrupt another, and then check the open contexts and the configured result limits. Done when the test shows contexts closing as expected, the result limits match the documented behavior for your version, and analysts know how large exports should be requested.
Document approved query patterns for analysts
The analyst lead and platform engineer write a short guide of approved SQL and PPL patterns, listing which indices each pattern may touch, the limits that apply, and the cases where analysts should use the query DSL or a dashboard instead. Include the access request process and the contact for query problems. Store the guide where the analyst team already works and link it to the role definitions. Done when the guide is reviewed and approved by the security owner, and each pattern has a test reference from the previous step.
Limits to confirm before analysts rely on SQL or PPL
SQL and PPL make OpenSearch easier to query, but they do not cover everything the query DSL does, and some behavior changes between versions. The cards below list the limits to test on your own cluster and data before analysts build saved work on top of them.
Result size limits
Confirm how many rows a SQL or PPL query can return in one response, and what happens when a result exceeds that size. Analysts who export large result sets may hit a cap that the DSL does not impose in the same way. Run a query that returns more rows than your dashboards need, then check whether it truncates silently or fails. Record the limit for each OpenSearch version you run, because it can change between releases.
SQL and PPL docsFunctions missing from SQL and PPL
Not every aggregation, scoring feature or query type available in the query DSL has a SQL or PPL equivalent. Build a list of the searches your analysts need, such as nested queries, geo searches or custom scoring, and map each one to a supported function. Anything without a clear equivalent should stay on the DSL or be handled in a dashboard. Check the function reference for your version before writing shared queries.
Performance on large indices
Test SQL and PPL queries against your largest indices with production-like time ranges and filters, not sample data. Translated queries may not use the same index paths as native DSL calls, so latency can differ. Check whether filters on timestamp and keyword fields are pushed down to the search engine. Use the profile output or slow query logs to compare the two query forms before recommending one for scheduled use.
Legacy Spark connector status
OpenSearch 3.0 deprecated the legacy Spark connector, so any pipeline that reads OpenSearch through it needs a planned replacement. Inventory every Spark job, notebook and BI connector that depends on it, along with the OpenSearch version each one runs against. Confirm the recommended successor in the breaking changes notes for your target version, and schedule the change before the connector is removed from your stack.
Breaking changes docsField-level security and masking
Confirm how SQL and PPL queries behave under the roles that restrict document-level and field-level security and field masking. Log in as a test user with a restricted role, run the same query in SQL, PPL and DSL, and compare which fields and values come back. A query path that exposes masked values or hidden fields is a data exposure issue, so include these checks in your access review.
Questions teams ask before enabling SQL and PPL
What work is needed to enable and validate SQL and PPL access on OpenSearch?
Enabling SQL and PPL is a small configuration step, but validating it is the real work. The team confirms the SQL plugin is present and working on the cluster version in use, sets role permissions so analysts can read only the indices they should, and runs a fixed set of approved queries against representative data. Validation also covers result correctness against known answers, pagination behavior with point in time, query limits and how slow queries appear in logs. Ask any partner to write down which queries, indices and roles are in scope before the work starts, and which of those checks produce evidence the security team can keep.
Can our own team enable and validate SQL and PPL without a partner?
Yes, if the team already runs the cluster and can test against realistic data. The plugin itself is part of OpenSearch, so the work is mostly configuration, role design and testing rather than software installation. A partner adds value when the platform has many roles, strict document or field controls, or a compliance review that needs documented evidence. Before deciding, check whether your engineers have owned OpenSearch Security role mappings and whether someone can own the query test suite after handover. Both are ongoing responsibilities, not one-time tasks.
What drives the effort for SQL and PPL enablement?
Effort rises with the number of cluster versions, roles, query patterns and existing reports that depend on the query DSL. A single version with two roles and a short list of approved queries is far smaller than a multi-team cluster with field-level security and dashboards built on raw DSL. OpenSearch 3.0 changed the SQL plugin's DSL response format, removed DELETE support, deprecated the legacy Spark connector and made point in time the default for pagination, so any cluster moving to or running 3.0 or later needs those changes reviewed. Query volume matters too, because heavy analyst use is where limits and workload controls get tested.
How long does validation usually take?
Duration depends on scope, and no fixed figure applies to every cluster. A narrow scope with one role and a small query catalog can often be validated quickly, while a scope that covers several teams, field masking and migrated reports takes longer because each role and query needs its own test. Ask for a written timeline tied to named deliverables: role matrix tested, query catalog passed, limits documented and handover completed. Ask what happens if test data or role decisions arrive late, since those are the most common causes of delay.
What must our team provide before validation starts?
Three inputs carry most of the work. First, test data that resembles production in field names, types and volume, so results and performance mean something. Second, a role matrix that lists each analyst group, the indices and fields it may read, and any masking or document-level filters. Third, a set of approved query examples in SQL and PPL, each with the expected answer and the business owner who signed off. Teams that skip the third input often find that analysts write queries nobody reviewed. Ask any quote to state these inputs explicitly and to name who on your side supplies and approves each one.
Do we have to migrate existing query DSL dashboards to use SQL and PPL?
No. SQL and PPL are offered alongside the query DSL, so existing DSL dashboards and reports can keep running while analysts adopt the newer languages for ad hoc work. Migration becomes necessary only when a dashboard or integration depends on a behavior that changed, such as the DSL response format removed from the SQL plugin in OpenSearch 3.0, or when a version upgrade retires something the report uses. Inventory existing DSL dependencies first, sort them into keep, rewrite and retire, and ask for that inventory as a deliverable in any quote.
Which query language should engineers and analysts use first?
Use SQL when analysts already think in tables and joins, and PPL when they want to build a query one step at a time. OpenSearch documents PPL as processing data step by step with the pipe operator, which suits log investigation and exploratory filtering. SQL suits teams moving from relational reporting. The DSL remains the option for precise control over scoring, aggregations and features that the other languages do not expose. Before rolling out either language, confirm with the platform team which features each supports on your version, and write that list into the approved query catalog so analysts know what is available.
What DeployOpen confirms with your team before building query access
Before any SQL or PPL access is built, DeployOpen confirms the cluster version and the upgrade plans that surround it. The version in production decides which SQL plugin behavior applies, so teams should confirm whether they run a 2.x or 3.x release and whether a major upgrade is scheduled. OpenSearch 3.0 changed the SQL plugin's DSL response format, removed DELETE support, deprecated the legacy Spark connector and made point in time the default pagination method. Any query that depends on those behaviors has to be found and retested before an upgrade window, not after it. Teams should also confirm which upgrade method they expect to use, since rolling upgrades, snapshot and restore, remote reindexing and Migration Assistant each change how long old and new behavior coexist.
Next, DeployOpen maps the analyst skill mix and the existing query estate. Some analysts will write SQL comfortably, others will work better in PPL's step-by-step pipe model, and some will still depend on the query DSL inherited from application code or dashboards. The team should list who runs ad hoc queries, who writes saved queries, and which DSL assets (saved searches, alerting monitors, scripts and application queries) must keep working. Roles and data classifications come next: DeployOpen checks which indexes and fields each role may read, using the Security plugin's role-based access, document-level and field-level security and field masking. A query that is allowed at the index level can still expose a sensitive field, so the classification of each field must be known before any analyst gets SQL or PPL access.
DeployOpen's work is fixed-scope, so these inputs are written into a scope and deliverables document that both parties sign before build starts. The findings shape the approved query catalog, the set of SQL and PPL statements, their owners, their permitted roles and their pagination and result limits that analysts may use. Items outside the catalog are either rejected or scheduled as a later change. Teams should ask for the scope to state which clusters, roles and indexes are covered, how many retest rounds are included and what happens when an upgrade changes the behavior of a cataloged query. Current SQL and PPL limits and plugin settings should be confirmed against the OpenSearch SQL and PPL documentation for the exact version in use.
How DeployOpen works on this
DeployOpen plans, implements, hardens, documents and supports self-hosted OpenSearch inside your own infrastructure, including the SQL and PPL access layer analysts will use. The work starts with a written scope that sets which roles, indices and query paths are covered, and it runs inside the cluster, accounts or networks you control.
How we scope
- Inventory the analysts, indices and data sets that will query through SQL or PPL, and which ones must stay off these paths.
- Agree in writing which query limits, pagination method and Dashboards access the engagement covers.
- Confirm the OpenSearch version in use and whether the SQL plugin changes from 3.0 apply to your cluster.
How we build
- Configure the SQL and PPL plugins and set up roles, document and field-level controls for each analyst group.
- Test pagination with point in time and check query timeouts and result size limits against your typical analyst queries.
- Test query behavior against the query DSL where existing dashboards or alerts depend on it, and record the differences.
How we hand over
- Deliver a written runbook with approved query patterns, example PPL and SQL statements, and the limits analysts should expect.
- Document role mappings, audit logging settings and the steps to review access changes after go-live.
- Walk your platform and security teams through the configuration so they can review and change it without us.
How we support
- Retest query access after each OpenSearch minor or major upgrade, including the breaking changes that apply to your version.
- Available as a retainer for ongoing upgrades, access reviews and changes to analyst query requirements.
- Ask any support provider to confirm response terms, upgrade testing and who keeps the configuration under change control.

