Kalzit is in early development. These pages describe what exists today and change as the milestones progress. Screenshots show the development version with demo data.

Explore

Explore runs free queries without a dashboard, shows the result in a matching visualization, lets you inspect it and add it to a dashboard. The HTTP API is described in data sources and queries.

Explore with a SQL query and a time series

Explore needs the datasources:query permission. Editors, admins and owners have it, and so does anyone with query access to a data source. Viewers still see the dashboards shared with them, which run their stored queries.

Start from zero

New to the query language of a source? Start here shows while the editor is empty: it says in plain words what the source holds, and its starter actions (such as the first 100 rows of a table, counts per value, nodes with a label or the latest log lines with an error) fill in a safe, read-only query with the names of your own tables, collections, labels or metrics and run it. Show the query shows how a starter is written before you use it. In the schema list beside the result, Show rows, Count and Show structure next to a table, collection, label, metric or index do the same for that entry. Cheat sheet (Shift+F1, or Ctrl+/ outside the editor) lists the common patterns of the current language, each with Insert, and how the time range and dashboard variables work with that source. A failed query, such as one with an unknown table or a syntax error, comes with a hint on what to change. Small tips appear once and can be dismissed; turn them off under Account > Preferences > Show tips. Examples per source kind are in Query languages for beginners in the repository.

Running a query

  1. Pick a Data source. The last one you used is remembered.
  2. Write the query in the editor (CodeMirror). Ctrl+Enter runs it, Ctrl+Space shows suggestions from the source’s schema (tables, columns, metrics, labels, fields).
  3. Press Run query. The Result tab shows the visualization. Inspect shows the result’s size, the executed query and notes from the server. Beside the tabs stands how much came back and how long it took (“312 documents · 18 ms”).
  4. Pick another Visualization if you like. Types that do not fit the result come last.

Documents get three tabs of their own: Documents (the tree), Schema (their fields and types) and Table (projection). The table needs a projection: Project into a table adds it as a visible first step with the top-level fields.

Share copies a link to what is on screen: data source, query, time range, steps and visualization. The link works for people in your organization; opening it runs the query, so they need the right to query that data source.

A query the server would refuse says why before you run it. The time range is the one you set for Explore, and the macros below pick it up. Variables and macros reach the database as parameters, never as text in the query. Writing queries are always refused, see Data sources.

Saving and live

Save (Ctrl+S) keeps the query with its steps and visualization as a saved analysis, and Open (Ctrl+O) loads one again; see Saved analyses. Live beside Run query keeps the result current: as soon as MongoDB reports a change, or at an interval for every other source; see Live updates.

Queries per source kind

Kind Query Result shape
PostgreSQL, MySQL and MariaDB, SQL Server, SQLite One SELECT or WITH statement frame
Prometheus PromQL; optional Instant query and Minimum step frame
Elasticsearch, OpenSearch Lucene query string or Query DSL (JSON); index or pattern, number of hits, time field documents (hits), frame (aggregations)
MongoDB Aggregation pipeline (stages) or Find (filter, projection, sort, limit, skip) on a collection documents
CSV, JSON, NDJSON files No query of its own; the data source names the file and how it is read frame (CSV), documents (JSON, NDJSON)
HTTP JSON A Path below the source’s URL, Query parameters, and the Path to the documents documents
Neo4j, Memgraph Cypher (reading only) graph
TigerGraph Write GSQL (INTERPRET QUERY (parameters) FOR GRAPH {graph}) or Run an installed query graph

Macros

Macros take the time range of the dashboard or of Explore:

  • SQL: $__timeFilter(column) (true for rows in the range), $__timeFrom, $__timeTo, $__interval (a suggested grouping interval such as 1m), $__interval_ms. Variables are written $name.
  • PromQL: $__interval, $__interval_ms, $__rate_interval (four intervals, at least 1m, a safe window for rate()), $__range, $__timeFrom, $__timeTo (Unix seconds). Variables only inside quoted strings, such as job="$job".
  • Cypher: $__timeFrom, $__timeTo (UTC DateTime values), $__timeFromMs, $__timeToMs, $__interval_ms.
  • Lucene and Query DSL: $__timeFrom, $__timeTo (Unix ms), $__interval, $__interval_ms. In Lucene, variables become quoted phrases. In Query DSL, a macro or variable is written as a whole string such as "$__interval".
  • MongoDB: in a $match or filter, {"$__timeFilter": "ts"} keeps the time range and "${name}" stands for a variable.

The editor lists the macros of the current kind next to the query.

Search sources

Pick an Index or pattern (such as logs-*,-logs-old; empty uses the data source’s index), the Query language, the Number of hits (500 when empty) and whether to Filter by the time range with a Time field. Start from a template: latest documents, count per value (terms), count over time (date histogram), count per value over time. Aggregations answer a table with one row per bucket.

The Elasticsearch Lucene editor in the dark theme

MongoDB

Choose Collection and Query type. In the pipeline view each stage is JSON, for example { "$match": { "status": "paid" } }, and can be moved, turned off and previewed (Preview after stage N). Raw pipeline shows the whole list. Database types use Extended JSON such as { "$oid": "<id>" }. Stages that write ($out, $merge) are refused by the server. A disabled stage is not saved with the query.

Files and HTTP JSON

A file query in the dark theme

A file source shows the file, how it is read and its columns. An HTTP JSON source sends only GET requests. Its preview shows the request.

An HTTP JSON query in the dark theme

Result shapes

Every result keeps its native shape. Conversions are explicit steps you add.

Frames

Tables and time series. A time series panel needs a time field and at least one number field. Pick a table, time series, stat, bar chart or any other frame panel.

Documents

A documents result stays a set of documents. Use the document explorer, schema, field distribution or document card (panels). Selecting a value in the tree, or Filter by value next to a common value of the field distribution, adds a filter on that path to the query as a visible $match stage. For MongoDB the field distribution counts the whole result in the database, not only the loaded documents, and says so: Across all N documents of the result. For a table, use the explicit projection step: Add projection step names columns by field path (items.0.price for an element of an array), with optional names and types. Remove the step and you get the documents back. A result shows at most a limited number of documents (Cut off at N documents), and Load more documents fetches the next ones (MongoDB, Elasticsearch and OpenSearch, JSON and NDJSON files).

Graphs

A graph result stays nodes and edges: the Network, Hierarchy or Paths panel (panels). Return paths from the query (for example with shortestPath) to use the path panel. In explorer mode a click loads a node’s neighbours.

Steps

The Steps and actions side panel holds analysis steps that work on the results one after the other: calculated fields, joins, statistics, trend, moving average, correlation, comparison with the previous period, group, pivot and the documents projection. The queries stay as they are. Each step is a compact card with its number, its name and the fields it uses; a click opens it for editing, and Add step opens the kinds of steps as a menu. See Calculated fields and statistics.

Add to dashboard

Add to dashboard… puts the query, its data source, the visualization and the steps into a panel. Choose An existing dashboard (you may change) or A new dashboard, then Add panel. The dashboard’s history records the save as “Panel added from Explore”.

Export

Export… downloads the result with all active steps applied, in its own shape: a table as CSV, Excel or JSON, documents as NDJSON or JSON, a graph as GraphML or JSON. See Export.

Query history

Explore keeps a history of the queries you ran, so you can find one again, load it into the editor or run it once more. Open it with the History button. It opens as a side panel named History, with the note that it is only visible to you and kept for 30 days.

Using the history

  • Each entry shows the data source, the query as one line, how long ago you ran it and how many rows the result had.
  • Search history finds entries whose query text contains what you type (up to 100 characters, capitals and small letters do not matter). Filter by data source keeps the entries of one source. Both can be combined.
  • Select an entry to load its query into the editor. Run again runs the stored query once more. Delete from history removes that one entry.
  • The list shows the newest entries first. Load more fetches the next ones.
  • Clear history deletes your whole history in this organization after a confirmation with Delete all. This cannot be undone.

What is kept

  • The history is private to you. Nobody else reads it, administrators and owners included, and the audit log is not affected.
  • You have a separate history in each organization.
  • Entries are kept for 30 days, at most 500 per organization. The newest stay.
  • Only runs from Explore are recorded, not the runs of dashboard panels. Only queries that succeeded are kept, and a query larger than 64 KiB is run but not kept. Running the same query on the same data source again right after it moves the latest entry to the top instead of adding another one.
  • Kalzit stores the text of the query exactly as you typed it, including any values in it, such as an id or an email address in a WHERE clause. Results are never stored, and neither are the settings or secrets of a data source.
  • Entries of a data source you may no longer query are left out of the list. They stay stored and reappear if your access returns.
  • History never grants access. Running an entry checks the datasources:query permission on its data source like any free query.

Warning. Do not put secrets into queries. Kalzit does not scan the text it stores.

The HTTP routes are described in the Explore history API.