FlatQL
Sign in Start free

FlatQL vs OpenSearch SQL

FlatQL vs OpenSearch SQL: the plugin, Query Workbench and where joins stop

The OpenSearch SQL plugin ships inside every standard OpenSearch distribution and comes with a Dashboards editor called Query Workbench. FlatQL is an external SQL workbench that can drive that plugin or run a larger SQL dialect on its own.

OpenSearch gives you two query languages besides Query DSL. The docs introduce SQL for "users with SQL experience who want to query OpenSearch data using familiar relational database syntax" and PPL, the Piped Processing Language, for log and trace analysis with a | between steps (SQL and PPL). Both come from the opensearch-sql plugin, which is bundled "with all OpenSearch distributions except for the minimal distribution" (plugins) and is Apache-2.0 licensed (GitHub). Query Workbench is the editor for it inside OpenSearch Dashboards. FlatQL is a different kind of tool: a SQL workbench that lives outside the cluster, pushes what it can into the cluster as Query DSL, and runs joins, CTEs and window functions in an embedded engine. It also has a Cluster SQL mode that hands a statement straight to _plugins/_sql, so you can use both dialects from one editor.

The plugin, the Workbench and FlatQL in one table#

OpenSearch SQL plugin + Query Workbench FlatQL
Licence Apache-2.0 (GitHub) Proprietary; Free plan, $199 lifetime Pro
Install Bundled with standard distributions; Query Workbench under OpenSearch Plugins in Dashboards (Workbench) Nothing on the cluster; web app or desktop app (coming soon)
Endpoints _plugins/_sql, _plugins/_ppl, _explain, _plugins/_sql/close (API) Search and aggregation APIs; Cluster SQL mode uses _plugins/_sql
Languages SQL and PPL SQL only (Snowflake flavour)
Join types Inner, cross, left outer; two indexes only (complex queries) Inner, left, right, full, cross, ASOF; any number of indices
Join rules AND-only ON clause; no GROUP BY or ORDER BY on the result; no LIMIT with OFFSET (complex queries) Full SQL over the joined rows; about 50,000 rows per index per statement
Subqueries FROM subquery only when "merged into one query"; V2 engine: "JOINs and sub-queries are not supported" (limitations) Subqueries, CTEs, UNION, HAVING, QUALIFY
Pagination fetch_size default 1,000, jdbc format only; "pagination only supports basic queries" (API, limitations) Streaming export to disk up to 5,000,000 rows
Row limit plugins.query.size_limit default 10000 (settings) Fetch cap about 50,000 rows per index; exports to 5,000,000
Drivers JDBC for BI tools; read-only ODBC for Windows and macOS (ODBC) None needed; browser or desktop
Access control OpenSearch security roles; Workbench is read-only (Workbench) Per-index read or write roles enforced by FlatQL, no cluster users
Managed service On Amazon OpenSearch Service for OpenSearch or Elasticsearch 6.5+ (AWS) Connects to Amazon OpenSearch Service domains

Where OpenSearch SQL is the better fit#

The plugin is already there. If your query is one index, a filter, a GROUP BY and a sort, POST _plugins/_sql returns rows in jdbc, csv or raw format with no account anywhere (API). Query Workbench adds an editor, a Run button, an Explain button that shows the translated request, and a download of the result. On Amazon OpenSearch Service the same workbench saves results "as text, JSON, JDBC, or CSV" (AWS).

PPL is the clearer win. There is no PPL in FlatQL. For log triage where each step is a filter, a stats and a sort, the piped form reads well and runs on the cluster.

Drivers are the other reason. The JDBC driver "lets you integrate OpenSearch with your favorite business intelligence (BI) applications" (JDBC), and the ODBC driver is "a read-only ODBC driver for Windows and macOS" for Excel, Power BI and Tableau (ODBC). Neither has a licence tier to clear.

Where FlatQL is the better fit#

The plugin's own limitations page is specific about joins: "JOIN queries are supported on a best-effort basis", they do "not support aggregations on the joined result", they end automatically after 60 seconds, and under the V2 engine "JOINs and sub-queries are not supported" (limitations). The complex-queries page adds the grammar rules: two indexes only, aliases required, AND-only ON, and "You can't use GROUP BY or ORDER BY for results" (complex queries).

That last rule is the one that bites. A join whose result you cannot group or sort is a join you then post-process somewhere else. FlatQL does the post-processing in place:

SELECT s.category, l.region,
       COUNT(*) AS errors,
       AVG(l.duration_ms) AS avg_ms,
       RANK() OVER (PARTITION BY s.category ORDER BY COUNT(*) DESC) AS rank_in_category
FROM "logs-*" AS l
JOIN suppliers AS s ON s.domain = l.service
WHERE l.level = 'ERROR' AND l."@timestamp" >= '2026-10-01'
GROUP BY s.category, l.region
QUALIFY rank_in_category <= 3
ORDER BY s.category, errors DESC;

The logs-* filter on level and @timestamp is pushed to the cluster as Query DSL. The join, the grouping over joined columns, the RANK() and the QUALIFY run in FlatQL's engine. Show as DSL displays the two requests that went to the cluster. The engine works on at most about 50,000 rows per index per statement, which is why the date filter is there; the pushdown rules list exactly which predicates qualify.

Pagination is the second difference. The plugin's cursor "is supported by the V1 engine only", needs the jdbc format, and "The query with aggregation and join does not support pagination for now" (limitations). FlatQL streams any result, grouped or joined, to CSV, TSV, JSON, NDJSON, Excel or Parquet on disk, up to 5,000,000 rows.

Window functions, CTEs and QUALIFY are the third; the window functions guide covers ROW_NUMBER, LAG and RANK with the pushdown each allows. Add a query history with user, connection and duration, Ask FlatQL to draft a statement from the mappings, and team roles that grant read or write per index pattern without a single OpenSearch security role being created.

Using both#

Keep the plugin for PPL, for BI drivers, and for anything you script against the endpoint. Keep Query Workbench for a quick Explain inside Dashboards. Open FlatQL when the statement needs a join you can group, a window function, or an export bigger than size_limit.

Cluster SQL mode ties them together. It sends your statement to _plugins/_sql on OpenSearch, or to _opendistro/_sql on legacy Amazon Elasticsearch domains, and shows the plugin's own result and error messages. When the plugin says no, switch the mode off and the same worksheet runs in the engine. How the two modes differ is in Cluster SQL mode.

Elastic's x-pack SQL has a different dialect and a stricter single-table rule; the Elasticsearch SQL comparison covers it. For the Dashboards-versus-workbench question in general, read FlatQL vs Kibana, whose points apply to OpenSearch Dashboards too. The Free plan includes one cluster and the full engine; see pricing.

FAQ

Questions

Anything else, write to us.

Does the OpenSearch SQL plugin support joins?

Partly. The docs list inner, cross and left outer joins, limited to two indexes, AND-only ON conditions, no GROUP BY or ORDER BY on the result, and no LIMIT with OFFSET. The limitations page adds that joins are "supported on a best-effort basis" and that the V2 engine does not support them. FlatQL runs joins in its own engine with no such limits beyond the 50,000-row fetch cap.

Does FlatQL work with Amazon OpenSearch Service?

Yes. It connects over HTTPS with your domain credentials. In Cluster SQL mode it uses _plugins/_sql, or _opendistro/_sql on legacy Elasticsearch domains, which is the same endpoint AWS documents.

Can I run PPL in FlatQL?

No. FlatQL is SQL only. Keep Query Workbench or the _plugins/_ppl endpoint for PPL.

Which OpenSearch versions does FlatQL support?

OpenSearch 1 and 2, plus Open Distro clusters that still run the _opendistro/_sql endpoint. See connect a cluster.

Start on Free. It stays free.

Connect a cluster and run a join in five minutes. No card, no expiry.

Guides

How FlatQL handles the jobs Elasticsearch makes hard.