Documentation
FlatQL documentation
Connect a cluster, learn what runs where, and find every function, limit and setting.
Start here
Getting startedConnect an Elasticsearch or OpenSearch clusterURL and API key, basic auth, Cloud ID or Amazon OpenSearch. Five minutes.Getting startedYour first SQL query on ElasticsearchWorksheets, Run, the result tabs and the execution line.SQL referencePushdown rules: what runs on the cluster and what runs in the engineWhat the cluster runs, what the engine runs, and how to tell.
Everything, by section
Getting started3
- Connect an Elasticsearch or OpenSearch clusterConnect Elasticsearch or OpenSearch to FlatQL with a URL and API key, basic auth, an Elastic Cloud ID or an Amazon OpenSearch domain, then set it read-only.
- Your first SQL query on ElasticsearchOpen a worksheet, run a first SQL statement against an Elasticsearch index, read the Table, Chart, Pivot, JSON and DSL tabs, and see what the cluster executed.
- Keyboard shortcuts in FlatQLEvery keyboard shortcut in the FlatQL worksheet and app shell: run the statement under the cursor with Cmd+Enter, save, comment, autocomplete and the palette.
SQL reference11
- Elasticsearch SQL syntax supported by FlatQLThe SQL dialect FlatQL runs on Elasticsearch and OpenSearch: table naming, quoting, supported clauses and functions, and the two statement kinds in a worksheet.
- Pushdown rules: what runs on the cluster and what runs in the engineRules FlatQL uses to send WHERE, ORDER BY, LIMIT and GROUP BY to Elasticsearch as Query DSL, the 50,000-row fetch cap, and how to write SQL that pushes down.
- Elasticsearch SQL joins across indicesJoin two Elasticsearch indices with plain SQL: inner, left, right, full, cross and ASOF joins, and how join keys reach the other index as a terms filter.
- Window functions on Elasticsearch dataRun ROW_NUMBER, RANK, LAG, LEAD and SUM OVER with frames on Elasticsearch and OpenSearch indices, filter on them with QUALIFY, and keep the fetch under the cap.
- CTEs, UNION, HAVING and subqueries on ElasticsearchWITH and recursive CTEs, UNION, EXCEPT, INTERSECT, HAVING, subqueries, CONNECT BY, ROLLUP, CUBE and PIVOT on Elasticsearch indices with FlatQL's SQL engine.
- SQL functions for Elasticsearch and OpenSearchElasticsearch SQL functions in FlatQL by category: IFF, NVL, DATE_TRUNC, DATEDIFF, SPLIT_PART, TRY_CAST, LISTAGG, APPROX_TOP_K, JSON access and FLATTEN.
- Full-text search in SQL with MATCH and SEARCHFull-text search in Elasticsearch SQL: MATCH(col, 'words'), phrase mode and SEARCH across columns, the match and multi_match DSL each becomes, keyword vs text.
- Index patterns like logs-* as SQL tablesQuery an Elasticsearch index pattern such as logs-* as one SQL table in FlatQL: quoting names with dashes or dots, aliases, and what mixed mappings do.
- Nested fields and arrays in Elasticsearch SQLElasticsearch nested fields in SQL with FlatQL: object vs nested types, col:field access, and LATERAL FLATTEN with f.value and f.index to turn arrays into rows.
- Elasticsearch field types in SQLElasticsearch field types in SQL: how keyword, text, long, double, date, boolean, ip, object, nested, geo_point appear in FlatQL and what the cluster filters.
- Limits, caps and unsupported SQLElasticsearch SQL limitations in FlatQL: the 50,000-row fetch cap per index, bucket and join-key caps, 5,000,000-row exports, unsupported SQL and plan limits.
Execution2
- Cluster SQL mode with x-pack SQL and the OpenSearch SQL pluginCluster SQL sends a FlatQL statement to x-pack SQL, the OpenSearch SQL plugin or Open Distro SQL unchanged: how detection works, what differs, when to use it.
- Show as DSL - the Query DSL behind every SQL statementShow as DSL maps SQL to Elasticsearch Query DSL: the exact request per index, what was pushed down, copying it to Kibana Dev Tools or curl, finding slow steps.
Ask FlatQL1
- Ask FlatQL - AI that writes Elasticsearch SQL and Query DSLAsk FlatQL turns an AI Elasticsearch query request into SQL or Query DSL from your real mappings and a sample document: what it sees, modes, fixes, limits.
Results2
- Result views: grid, chart, pivot, JSON and DSLHow FlatQL shows a SQL result from Elasticsearch: a sortable grid with column tools, bar, line, area and scatter charts, a pivot, JSON and the DSL.
- Export Elasticsearch results to CSV, Excel and JSONStream a SQL result from Elasticsearch or OpenSearch straight to CSV, TSV, JSON or Excel. Up to 5,000,000 rows, written to disk as they arrive, on the Pro plan.
Monitoring1
- Query history and usage for ElasticsearchFlatQL records every SQL statement with user, connection, duration and rows, groups repeated statements by fingerprint and charts usage by user or connection.
Teams1
- Teams, roles and per-index access for ElasticsearchShare Elasticsearch connections without sharing credentials: owner, admin and member roles, read or write per index pattern, and an audit log.
Load data1
- Load CSV, Excel, JSON and API data into ElasticsearchImport a CSV, Excel, JSON or NDJSON file, or a paginated JSON API with header auth, into an Elasticsearch or OpenSearch index. Preview, then load.
Desktop app1
- FlatQL desktop app for macOS, Windows and LinuxThe FlatQL desktop app runs the SQL engine on your machine, reaches localhost and VPN clusters, and keeps credentials in the OS keychain behind a PIN.
Security1
- Security: what FlatQL stores and where credentials liveWhat FlatQL keeps (account, connections, query history, audit log, Ask FlatQL questions), how credentials are encrypted and what stays on your machine.
Pricing1
- Pricing and licensing: Free, and Pro for $199 onceFlatQL is free for one cluster. Pro is a $199 one-time lifetime licence per user: unlimited clusters, exports, full history and Ask FlatQL. No subscription.
Help3
- Troubleshooting Elasticsearch connections and queriesFix 401 and 403 errors, unreachable hosts, self-signed certificates, timeouts, mapping conflicts in index patterns, the 50,000-row fetch cap and failed exports.
- FlatQL FAQ: SQL on Elasticsearch, answeredShort answers on SQL for Elasticsearch and OpenSearch with FlatQL: joins, pushdown, versions, exports, teams, security, the desktop app and the Pro licence.
- ChangelogWhat changed in FlatQL, newest first: web app 0.4.2 and desktop app 0.4.7, covering the SQL engine, Ask FlatQL, billing, teams and data loading.
Connect a cluster and try it.
Free for one cluster, full SQL engine, no card.